summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2017-11-27 12:16:13 +0000
committerGitHub <noreply@github.com>2017-11-27 12:16:13 +0000
commit4f886a2356db6d1e52682ec458a350608b49dd01 (patch)
tree182dd246af1c3d727725f574e2573177a9c72d47
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentAvoid doing presence updates on replication reconnect (diff)
downloadsynapse-4f886a2356db6d1e52682ec458a350608b49dd01.tar.xz
Merge pull request #2709 from matrix-org/rav/disable_presence_better
Avoid doing presence updates on replication reconnect
-rw-r--r--synapse/app/synchrotron.py2
-rw-r--r--synapse/handlers/presence.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/synapse/app/synchrotron.py b/synapse/app/synchrotron.py
index 33780f7c2c..ed5c9135d7 100644
--- a/synapse/app/synchrotron.py
+++ b/synapse/app/synchrotron.py
@@ -215,6 +215,8 @@ class SynchrotronPresence(object):
         yield self.notify_from_replication(states, stream_id)
 
     def get_currently_syncing_users(self):
+        # presence is disabled on matrix.org, so we return the empty set
+        return set()
         return [
             user_id for user_id, count in self.user_to_num_current_syncs.iteritems()
             if count > 0
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index b70dfb6d7e..35890e710a 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -445,6 +445,7 @@ class PresenceHandler(object):
         Returns:
             set(str): A set of user_id strings.
         """
+        # presence is disabled on matrix.org, so we return the empty set
         return set()
         syncing_user_ids = {
             user_id for user_id, count in self.user_to_num_current_syncs.items()