summary refs log tree commit diff
path: root/synapse/handlers/directory.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-05-31 13:53:48 +0100
committerMark Haines <mark.haines@matrix.org>2016-05-31 13:53:48 +0100
commitc626fc576a87f401c594cbb070d5b0000e45b4e1 (patch)
treee72ab5618420cd31c55493ed56f3e781c6eb1078 /synapse/handlers/directory.py
parentMerge pull request #802 from matrix-org/dbkr/split_room_list_handler (diff)
downloadsynapse-c626fc576a87f401c594cbb070d5b0000e45b4e1.tar.xz
Move the AS handler out of the Handlers object.
Access it directly from the homeserver itself. It already wasn't
inheriting from BaseHandler storing it on the Handlers object was
already somewhat dubious.
Diffstat (limited to 'synapse/handlers/directory.py')
-rw-r--r--synapse/handlers/directory.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py
index 8eeb225811..4bea7f2b19 100644
--- a/synapse/handlers/directory.py
+++ b/synapse/handlers/directory.py
@@ -33,6 +33,7 @@ class DirectoryHandler(BaseHandler):
         super(DirectoryHandler, self).__init__(hs)
 
         self.state = hs.get_state_handler()
+        self.appservice_handler = hs.get_application_service_handler()
 
         self.federation = hs.get_replication_layer()
         self.federation.register_query_handler(
@@ -281,7 +282,7 @@ class DirectoryHandler(BaseHandler):
         )
         if not result:
             # Query AS to see if it exists
-            as_handler = self.hs.get_handlers().appservice_handler
+            as_handler = self.appservice_handler
             result = yield as_handler.query_room_alias_exists(room_alias)
         defer.returnValue(result)