summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2023-03-08 17:05:00 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2023-03-08 17:05:00 +0000
commitcb8d9e3d75dd5d6897b562e76eb5767fbd4b78a3 (patch)
tree96bdcbb3cabbf10cdbd04f90d08eb6c6bc83e4d9 /synapse/handlers/room.py
parentMove ThirdPartyEventRules into module_api/callbacks (diff)
downloadsynapse-github/anoa/public_rooms_module_api_backup.tar.xz
Update usages of ThirdPartyEventRules module callbacks github/anoa/public_rooms_module_api_backup anoa/public_rooms_module_api_backup
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py

index 131d35155f..80827a4f3d 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py
@@ -159,7 +159,9 @@ class RoomCreationHandler: ) self._server_notices_mxid = hs.config.servernotices.server_notices_mxid - self.third_party_event_rules = hs.get_third_party_event_rules() + self._third_party_event_rules = ( + hs.get_module_api_callbacks().third_party_event_rules + ) async def upgrade_room( self, requester: Requester, old_room_id: str, new_version: RoomVersion @@ -737,7 +739,7 @@ class RoomCreationHandler: # Let the third party rules modify the room creation config if needed, or abort # the room creation entirely with an exception. - await self.third_party_event_rules.on_create_room( + await self._third_party_event_rules.on_create_room( requester, config, is_requester_admin=is_requester_admin ) @@ -874,7 +876,7 @@ class RoomCreationHandler: # Check whether this visibility value is blocked by a third party module allowed_by_third_party_rules = ( await ( - self.third_party_event_rules.check_visibility_can_be_modified( + self._third_party_event_rules.check_visibility_can_be_modified( room_id, visibility ) ) @@ -1724,7 +1726,7 @@ class RoomShutdownHandler: self.room_member_handler = hs.get_room_member_handler() self._room_creation_handler = hs.get_room_creation_handler() self._replication = hs.get_replication_data_handler() - self._third_party_rules = hs.get_third_party_event_rules() + self._third_party_rules = hs.get_module_api_callbacks().third_party_event_rules self.event_creation_handler = hs.get_event_creation_handler() self.store = hs.get_datastores().main