federation-api: Add V2 send join
This commit is contained in:
parent
e01706d1bb
commit
ea2992a412
@ -16,7 +16,7 @@ Improvements:
|
||||
get_server_version::v1
|
||||
},
|
||||
membership::{
|
||||
create_join_event::v1,
|
||||
create_join_event::{v1, v2},
|
||||
create_join_event_template::v1
|
||||
},
|
||||
openid::{
|
||||
|
36
ruma-federation-api/src/membership/create_join_event/v2.rs
Normal file
36
ruma-federation-api/src/membership/create_join_event/v2.rs
Normal file
@ -0,0 +1,36 @@
|
||||
//! [PUT /_matrix/federation/v2/send_join/{roomId}/{eventId}](https://matrix.org/docs/spec/server_server/r0.1.4#put-matrix-federation-v2-send-join-roomid-eventid)
|
||||
|
||||
use ruma_api::ruma_api;
|
||||
use ruma_events::pdu::PduStub;
|
||||
use ruma_identifiers::{EventId, RoomId};
|
||||
|
||||
use super::RoomState;
|
||||
|
||||
ruma_api! {
|
||||
metadata: {
|
||||
description: "Send a join event to a resident server.",
|
||||
name: "create_join_event",
|
||||
method: PUT,
|
||||
path: "/_matrix/federation/v2/send_join/:room_id/:event_id",
|
||||
rate_limited: false,
|
||||
requires_authentication: true,
|
||||
}
|
||||
|
||||
request: {
|
||||
/// The room ID that is about to be joined.
|
||||
#[ruma_api(path)]
|
||||
pub room_id: RoomId,
|
||||
/// The user ID the join event will be for.
|
||||
#[ruma_api(path)]
|
||||
pub event_id: EventId,
|
||||
|
||||
/// PDU type without event and room IDs.
|
||||
#[ruma_api(body)]
|
||||
pub pdu_stub: PduStub,
|
||||
}
|
||||
|
||||
response: {
|
||||
/// Full state of the room.
|
||||
pub room_state: RoomState,
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user