pub mod unstable {
use ruma_common::{
OwnedEventId, OwnedRoomId,
api::{auth_scheme::AccessToken, request, response},
metadata,
};
metadata! {
method: PUT,
rate_limited: true,
authentication: AccessToken,
history: {
unstable("org.matrix.msc4306") => "/_matrix/client/unstable/io.element.msc4306/rooms/{room_id}/thread/{thread_root}/subscription",
}
}
#[request(error = crate::Error)]
pub struct Request {
#[ruma_api(path)]
pub room_id: OwnedRoomId,
#[ruma_api(path)]
pub thread_root: OwnedEventId,
#[serde(skip_serializing_if = "Option::is_none")]
pub automatic: Option<OwnedEventId>,
}
#[response(error = crate::Error)]
pub struct Response {}
impl Request {
pub fn new(
room_id: OwnedRoomId,
thread_root: OwnedEventId,
automatic: Option<OwnedEventId>,
) -> Self {
Self { room_id, thread_root, automatic }
}
}
impl Response {
pub fn new() -> Self {
Self {}
}
}
}