summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-02-27 13:53:46 +0000
committerErik Johnston <erik@matrix.org>2019-02-27 13:53:46 +0000
commit1e315017d3c0dcde20e781fb3c87bc0e54c53cd1 (patch)
treeaa557adaf68e7fbeee7e3296ad89e79f0c867aa3 /synapse/federation
parentMerge pull request #4749 from matrix-org/erikj/replication_connection_backoff (diff)
downloadsynapse-1e315017d3c0dcde20e781fb3c87bc0e54c53cd1.tar.xz
When presence is enabled don't send over replication
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/federation_server.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index 569eb277a9..81f3b4b1ff 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -886,6 +886,9 @@ class ReplicationFederationHandlerRegistry(FederationHandlerRegistry):
     def on_edu(self, edu_type, origin, content):
         """Overrides FederationHandlerRegistry
         """
+        if not self.config.use_presence and edu_type == "m.presence":
+            return
+
         handler = self.edu_handlers.get(edu_type)
         if handler:
             return super(ReplicationFederationHandlerRegistry, self).on_edu(