config option to block non-admin room invites
works just like block_non_admin_invites from synapse Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
c97483dbd3
commit
ea66bff46b
5 changed files with 34 additions and 0 deletions
|
@ -1845,6 +1845,13 @@ pub async fn create_invite_route(
|
|||
.as_ref()
|
||||
.expect("server is authenticated");
|
||||
|
||||
if services().globals.block_non_admin_invites() {
|
||||
info!("Received remote invite from server {} for room {}, but \"block_non_admin_invites\" is enabled, rejecting.", &sender_servername, &body.room_id);
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::Forbidden,
|
||||
"This server does not allow room invites.",
|
||||
));
|
||||
}
|
||||
services()
|
||||
.rooms
|
||||
.event_handler
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue