git-subtree-dir: ruma-federation-api git-subtree-mainline: acff664671e3f53bd012d33228363780eb20cf35 git-subtree-split: 44a0f493d0ae119fb1175a5f61c2db52ef001fb7
40 lines
1.2 KiB
Rust
40 lines
1.2 KiB
Rust
//! [GET /_matrix/federation/v1/make_join/{roomId}/{userId}](https://matrix.org/docs/spec/server_server/r0.1.3#get-matrix-federation-v1-make-join-roomid-userid)
|
|
|
|
use js_int::UInt;
|
|
use ruma_api::ruma_api;
|
|
use ruma_events::EventJson;
|
|
use ruma_identifiers::{RoomId, UserId};
|
|
|
|
use crate::RoomV3Pdu;
|
|
|
|
ruma_api! {
|
|
metadata {
|
|
description: "Send a request for a join event template to a resident server.",
|
|
name: "create_join_event_template",
|
|
method: GET,
|
|
path: "/_matrix/federation/v1/make_join/:room_id/:user_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 user_id: UserId,
|
|
#[ruma_api(query)]
|
|
/// The room versions the sending server has support for. Defaults to [1].
|
|
#[serde(skip_serializing_if = "Vec::is_empty")]
|
|
pub ver: Vec<UInt>,
|
|
}
|
|
|
|
response {
|
|
/// The version of the room where the server is trying to join.
|
|
pub room_version: Option<UInt>,
|
|
/// An unsigned template event.
|
|
pub event: EventJson<RoomV3Pdu>,
|
|
}
|
|
}
|