diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2023-05-04 15:18:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 14:18:22 +0000 |
commit | 2e59e97ebd02e93da39e6c90335d3b24ed01217a (patch) | |
tree | 078d22f7f4d6f03bafe7febf0c7bc3a81a953506 /synapse/handlers/room.py | |
parent | Update the base rules to remove the dont_notify action. (MSC3987) (#15534) (diff) | |
download | synapse-2e59e97ebd02e93da39e6c90335d3b24ed01217a.tar.xz |
Move ThirdPartyEventRules into module_api/callbacks (#15535)
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index efd9612d90..5e1702d78a 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -160,7 +160,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 @@ -742,7 +744,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 ) @@ -879,7 +881,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 ) ) @@ -1731,7 +1733,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 |