Query ThirdPartyEventRules about public rooms during room creation
parent
0503eee4cb
commit
9eae87daa5
|
@ -683,6 +683,13 @@ class RoomCreationHandler(BaseHandler):
|
||||||
|
|
||||||
directory_handler = self.hs.get_handlers().directory_handler
|
directory_handler = self.hs.get_handlers().directory_handler
|
||||||
if room_alias:
|
if room_alias:
|
||||||
|
# Check if publishing is blocked by a third party module
|
||||||
|
allowed_by_third_party_rules = await (
|
||||||
|
self.third_party_event_rules.check_room_can_be_added_to_public_rooms_directory(
|
||||||
|
room_id
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if allowed_by_third_party_rules:
|
||||||
await directory_handler.create_association(
|
await directory_handler.create_association(
|
||||||
requester=requester,
|
requester=requester,
|
||||||
room_id=room_id,
|
room_id=room_id,
|
||||||
|
|
Loading…
Reference in New Issue