summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-11-23 15:14:24 +0000
committerErik Johnston <erik@matrix.org>2016-11-23 15:14:24 +0000
commitfeec71826523deb63ca6b43cdcecc8edf8710775 (patch)
tree22e17d6e0fca9a1ad4055198dcb0488cb3084623 /synapse/server.py
parentFix tests (diff)
downloadsynapse-feec71826523deb63ca6b43cdcecc8edf8710775.tar.xz
Shuffle receipt handler around so that worker apps don't need to load it
Diffstat (limited to '')
-rw-r--r--synapse/server.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index ef75ab434c..0bfb411269 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -47,6 +47,7 @@ from synapse.handlers.sync import SyncHandler
 from synapse.handlers.typing import TypingHandler
 from synapse.handlers.events import EventHandler, EventStreamHandler
 from synapse.handlers.initial_sync import InitialSyncHandler
+from synapse.handlers.receipts import ReceiptsHandler
 from synapse.http.client import SimpleHttpClient, InsecureInterceptableContextFactory
 from synapse.http.matrixfederationclient import MatrixFederationHttpClient
 from synapse.notifier import Notifier
@@ -129,6 +130,7 @@ class HomeServer(object):
         'media_repository',
         'federation_transport_client',
         'federation_sender',
+        'receipts_handler',
     ]
 
     def __init__(self, hostname, **kwargs):
@@ -281,6 +283,9 @@ class HomeServer(object):
         else:
             raise Exception("Workers cannot send federation traffic")
 
+    def build_receipts_handler(self):
+        return ReceiptsHandler(self)
+
     def remove_pusher(self, app_id, push_key, user_id):
         return self.get_pusherpool().remove_pusher(app_id, push_key, user_id)