knocking implementation

Signed-off-by: strawberry <strawberry@puppygock.gay>

add sync bit of knocking

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2025-01-11 18:43:54 -05:00
parent fabd3cf567
commit 5a1c41e66b
14 changed files with 978 additions and 117 deletions

View file

@ -9,7 +9,7 @@ use serde_json::value::to_raw_value;
use super::make_join::maybe_strip_event_id;
use crate::{service::pdu::PduBuilder, Ruma};
/// # `PUT /_matrix/federation/v1/make_leave/{roomId}/{eventId}`
/// # `GET /_matrix/federation/v1/make_leave/{roomId}/{eventId}`
///
/// Creates a leave template.
pub(crate) async fn create_leave_event_template_route(
@ -21,7 +21,9 @@ pub(crate) async fn create_leave_event_template_route(
}
if body.user_id.server_name() != body.origin() {
return Err!(Request(BadJson("Not allowed to leave on behalf of another server/user.")));
return Err!(Request(Forbidden(
"Not allowed to leave on behalf of another server/user."
)));
}
// ACL check origin