summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-07-26 11:44:22 +0100
committerErik Johnston <erik@matrix.org>2018-08-06 15:23:31 +0100
commita3f5bf79a0fc0ea6d59069945f53717a3e9c6581 (patch)
tree5e8cabe33af2923ff80502b9e3e4eda6118af65b /synapse/server.py
parentAdd replication APIs for persisting federation events (diff)
downloadsynapse-a3f5bf79a0fc0ea6d59069945f53717a3e9c6581.tar.xz
Add EDU/query handling over replication
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 140be9ebe8..26228d8c72 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -36,6 +36,7 @@ from synapse.federation.federation_client import FederationClient
 from synapse.federation.federation_server import (
     FederationHandlerRegistry,
     FederationServer,
+    ReplicationFederationHandlerRegistry,
 )
 from synapse.federation.send_queue import FederationRemoteSendQueue
 from synapse.federation.transaction_queue import TransactionQueue
@@ -423,7 +424,10 @@ class HomeServer(object):
         return RoomMemberMasterHandler(self)
 
     def build_federation_registry(self):
-        return FederationHandlerRegistry()
+        if self.config.worker_app:
+            return ReplicationFederationHandlerRegistry(self)
+        else:
+            return FederationHandlerRegistry()
 
     def build_server_notices_manager(self):
         if self.config.worker_app: