summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2018-08-24 11:44:26 -0400
committerGitHub <noreply@github.com>2018-08-24 11:44:26 -0400
commit83caead95a921b0977164468a52c5c0b6e9eee5a (patch)
treee87ae6c5d439de1e1dfd7598cab35a14e320ef59 /synapse/server.py
parentallow session_data to be any JSON instead of just a string (diff)
parentMerge pull request #3755 from matrix-org/erikj/fix_server_notice_tags (diff)
downloadsynapse-83caead95a921b0977164468a52c5c0b6e9eee5a.tar.xz
Merge branch 'develop' into e2e_backups
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 706cb1361f..a795643add 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
@@ -56,7 +57,7 @@ from synapse.handlers.initial_sync import InitialSyncHandler
 from synapse.handlers.message import EventCreationHandler, MessageHandler
 from synapse.handlers.pagination import PaginationHandler
 from synapse.handlers.presence import PresenceHandler
-from synapse.handlers.profile import ProfileHandler
+from synapse.handlers.profile import BaseProfileHandler, MasterProfileHandler
 from synapse.handlers.read_marker import ReadMarkerHandler
 from synapse.handlers.receipts import ReceiptsHandler
 from synapse.handlers.room import RoomContextHandler, RoomCreationHandler
@@ -312,7 +313,10 @@ class HomeServer(object):
         return InitialSyncHandler(self)
 
     def build_profile_handler(self):
-        return ProfileHandler(self)
+        if self.config.worker_app:
+            return BaseProfileHandler(self)
+        else:
+            return MasterProfileHandler(self)
 
     def build_event_creation_handler(self):
         return EventCreationHandler(self)
@@ -428,7 +432,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: