mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2024-11-28 05:45:48 +00:00
check if we know about room at /make_leave
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
826edc0a3a
commit
0256c27363
|
@ -1365,6 +1365,10 @@ pub(crate) async fn create_join_event_v2_route(
|
||||||
pub(crate) async fn create_leave_event_template_route(
|
pub(crate) async fn create_leave_event_template_route(
|
||||||
body: Ruma<prepare_leave_event::v1::Request>,
|
body: Ruma<prepare_leave_event::v1::Request>,
|
||||||
) -> Result<prepare_leave_event::v1::Response> {
|
) -> Result<prepare_leave_event::v1::Response> {
|
||||||
|
if !services().rooms.metadata.exists(&body.room_id)? {
|
||||||
|
return Err(Error::BadRequest(ErrorKind::NotFound, "Room is unknown to this server."));
|
||||||
|
}
|
||||||
|
|
||||||
let origin = body.origin.as_ref().expect("server is authenticated");
|
let origin = body.origin.as_ref().expect("server is authenticated");
|
||||||
|
|
||||||
// ACL check origin
|
// ACL check origin
|
||||||
|
|
Loading…
Reference in a new issue