summary refs log tree commit diff
path: root/synapse/handlers/directory.py
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2023-05-04 15:18:22 +0100
committerGitHub <noreply@github.com>2023-05-04 14:18:22 +0000
commit2e59e97ebd02e93da39e6c90335d3b24ed01217a (patch)
tree078d22f7f4d6f03bafe7febf0c7bc3a81a953506 /synapse/handlers/directory.py
parentUpdate the base rules to remove the dont_notify action. (MSC3987) (#15534) (diff)
downloadsynapse-2e59e97ebd02e93da39e6c90335d3b24ed01217a.tar.xz
Move ThirdPartyEventRules into module_api/callbacks (#15535)
Diffstat (limited to 'synapse/handlers/directory.py')
-rw-r--r--synapse/handlers/directory.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py
index 5e8316e2e5..1e0623c7f8 100644
--- a/synapse/handlers/directory.py
+++ b/synapse/handlers/directory.py
@@ -52,7 +52,9 @@ class DirectoryHandler:
         self.config = hs.config
         self.enable_room_list_search = hs.config.roomdirectory.enable_room_list_search
         self.require_membership = hs.config.server.require_membership_for_aliases
-        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
+        )
         self.server_name = hs.hostname
 
         self.federation = hs.get_federation_client()
@@ -503,7 +505,7 @@ class DirectoryHandler:
             # Check if publishing 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
                     )
                 )