Fix create_join_event and create_join_event_template endpoints

This commit is contained in:
Timo 2020-08-12 14:11:11 +02:00 committed by Jonas Platte
parent 6df02fc7e2
commit 58abd51d1e
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
4 changed files with 9 additions and 4 deletions

View File

@ -3,6 +3,7 @@
Breaking Changes: Breaking Changes:
* Replace `directory::get_public_rooms::v1::{PublicRoomsChunk, RoomNetwork}` with types from `ruma_common::directory` * Replace `directory::get_public_rooms::v1::{PublicRoomsChunk, RoomNetwork}` with types from `ruma_common::directory`
* Wrap `PduStub`s in `membership::create_join_event` in `Raw`
Improvements: Improvements:
@ -17,6 +18,7 @@ Improvements:
query_keys::v1, query_keys::v1,
}, },
membership::create_invite::{v1, v2}, membership::create_invite::{v1, v2},
membership::create_join_event::v2,
``` ```
# 0.0.3 # 0.0.3
@ -31,7 +33,6 @@ Improvements:
``` ```
authorization::get_event_authorization::v1, authorization::get_event_authorization::v1,
membership::create_join_event::v2,
openid::get_openid_userinfo::v1, openid::get_openid_userinfo::v1,
query::get_profile_information::v1, query::get_profile_information::v1,
transactions::send_transaction_message::v1, transactions::send_transaction_message::v1,

View File

@ -1,6 +1,7 @@
//! Endpoint to send join events to remote homeservers. //! Endpoint to send join events to remote homeservers.
pub mod v1; pub mod v1;
pub mod v2;
use ruma_common::Raw; use ruma_common::Raw;
use ruma_events::pdu::Pdu; use ruma_events::pdu::Pdu;

View File

@ -2,6 +2,7 @@
use ruma_api::ruma_api; use ruma_api::ruma_api;
use ruma_events::pdu::PduStub; use ruma_events::pdu::PduStub;
use ruma_common::Raw;
use ruma_identifiers::{EventId, RoomId}; use ruma_identifiers::{EventId, RoomId};
use super::RoomState; use super::RoomState;
@ -26,11 +27,11 @@ ruma_api! {
/// PDU type without event and room IDs. /// PDU type without event and room IDs.
#[ruma_api(body)] #[ruma_api(body)]
pub pdu_stub: PduStub, pub pdu_stub: Raw<PduStub>,
} }
response: { response: {
/// Full state of the room. /// Full state and auth chain of the room prior to the join event.
#[ruma_api(body)] #[ruma_api(body)]
#[serde(with = "crate::serde::room_state")] #[serde(with = "crate::serde::room_state")]
pub room_state: RoomState, pub room_state: RoomState,

View File

@ -2,6 +2,7 @@
use ruma_api::ruma_api; use ruma_api::ruma_api;
use ruma_events::pdu::PduStub; use ruma_events::pdu::PduStub;
use ruma_common::Raw;
use ruma_identifiers::{EventId, RoomId}; use ruma_identifiers::{EventId, RoomId};
use super::RoomState; use super::RoomState;
@ -26,11 +27,12 @@ ruma_api! {
/// PDU type without event and room IDs. /// PDU type without event and room IDs.
#[ruma_api(body)] #[ruma_api(body)]
pub pdu_stub: PduStub, pub pdu_stub: Raw<PduStub>,
} }
response: { response: {
/// Full state of the room. /// Full state of the room.
#[ruma_api(body)]
pub room_state: RoomState, pub room_state: RoomState,
} }
} }