mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 17:12:13 -04:00
Third party event rules Update (#6781)
This commit is contained in:
parent
ed630ea17c
commit
99fcc96289
3 changed files with 10 additions and 4 deletions
|
@ -579,9 +579,13 @@ class RoomCreationHandler(BaseHandler):
|
|||
|
||||
# Check whether the third party rules allows/changes the room create
|
||||
# request.
|
||||
yield self.third_party_event_rules.on_create_room(
|
||||
event_allowed = yield self.third_party_event_rules.on_create_room(
|
||||
requester, config, is_requester_admin=is_requester_admin
|
||||
)
|
||||
if not event_allowed:
|
||||
raise SynapseError(
|
||||
403, "You are not permitted to create rooms", Codes.FORBIDDEN
|
||||
)
|
||||
|
||||
if not is_requester_admin and not self.spam_checker.user_may_create_room(
|
||||
user_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue