federation-api: Minor fixes to create_join_event
This commit is contained in:
parent
34c4b6c110
commit
d809066c9c
@ -5,7 +5,8 @@ Breaking Changes:
|
||||
* Replace `directory::get_public_rooms::v1::{PublicRoomsChunk, RoomNetwork}` with types from
|
||||
`ruma_common::directory`
|
||||
* Wrap `PduStub`s in `membership::create_join_event` in `Raw`
|
||||
* Use `Pdu` instead of `PduStub` in `membership::create_join_event` endpoints
|
||||
* Remove `PduStub` (it only existed because of the spec being misleading)
|
||||
* Rename `pdu_stub` fields to `pdu`
|
||||
|
||||
Improvements:
|
||||
|
||||
|
@ -19,16 +19,18 @@ ruma_api! {
|
||||
|
||||
request: {
|
||||
/// The room ID that is about to be joined.
|
||||
///
|
||||
/// Do not use this. Instead, use the `room_id` field inside the PDU.
|
||||
#[ruma_api(path)]
|
||||
pub room_id: &'a RoomId,
|
||||
|
||||
/// The user ID the join event will be for.
|
||||
/// The event ID for the join event.
|
||||
#[ruma_api(path)]
|
||||
pub event_id: &'a EventId,
|
||||
|
||||
/// PDU type
|
||||
/// The PDU.
|
||||
#[ruma_api(body)]
|
||||
pub pdu_stub: Raw<Pdu>,
|
||||
pub pdu: Raw<Pdu>,
|
||||
}
|
||||
|
||||
response: {
|
||||
@ -41,8 +43,8 @@ ruma_api! {
|
||||
|
||||
impl<'a> Request<'a> {
|
||||
/// Creates a `Request` from the given room ID, event ID and `Pdu`.
|
||||
pub fn new(room_id: &'a RoomId, event_id: &'a EventId, pdu_stub: Raw<Pdu>) -> Self {
|
||||
Self { room_id, event_id, pdu_stub }
|
||||
pub fn new(room_id: &'a RoomId, event_id: &'a EventId, pdu: Raw<Pdu>) -> Self {
|
||||
Self { room_id, event_id, pdu }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,18 @@ ruma_api! {
|
||||
|
||||
request: {
|
||||
/// The room ID that is about to be joined.
|
||||
///
|
||||
/// Do not use this. Instead, use the `room_id` field inside the PDU.
|
||||
#[ruma_api(path)]
|
||||
pub room_id: &'a RoomId,
|
||||
|
||||
/// The user ID the join event will be for.
|
||||
/// The event ID for the join event.
|
||||
#[ruma_api(path)]
|
||||
pub event_id: &'a EventId,
|
||||
|
||||
/// PDU type
|
||||
/// The PDU.
|
||||
#[ruma_api(body)]
|
||||
pub pdu_stub: Raw<Pdu>,
|
||||
pub pdu: Raw<Pdu>,
|
||||
}
|
||||
|
||||
response: {
|
||||
@ -40,8 +42,8 @@ ruma_api! {
|
||||
|
||||
impl<'a> Request<'a> {
|
||||
/// Creates a `Request` from the given room ID, event ID and `Pdu`.
|
||||
pub fn new(room_id: &'a RoomId, event_id: &'a EventId, pdu_stub: Raw<Pdu>) -> Self {
|
||||
Self { room_id, event_id, pdu_stub }
|
||||
pub fn new(room_id: &'a RoomId, event_id: &'a EventId, pdu: Raw<Pdu>) -> Self {
|
||||
Self { room_id, event_id, pdu }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user