summary refs log tree commit diff
path: root/synapse/handlers/initial_sync.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-08-18 01:08:45 +1000
committerGitHub <noreply@github.com>2018-08-18 01:08:45 +1000
commitc334ca67bb89039b3a00b7c9a1ce610e99859653 (patch)
treebc70fc575b225a0cd25694bbd371f3c78bea3b43 /synapse/handlers/initial_sync.py
parentRemove v1/register's broken shared secret functionality (#3703) (diff)
downloadsynapse-c334ca67bb89039b3a00b7c9a1ce610e99859653.tar.xz
Integrate presence from hotfixes (#3694)
Diffstat (limited to 'synapse/handlers/initial_sync.py')
-rw-r--r--synapse/handlers/initial_sync.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/initial_sync.py b/synapse/handlers/initial_sync.py
index 1fb17fd9a5..e009395207 100644
--- a/synapse/handlers/initial_sync.py
+++ b/synapse/handlers/initial_sync.py
@@ -372,6 +372,10 @@ class InitialSyncHandler(BaseHandler):
 
         @defer.inlineCallbacks
         def get_presence():
+            # If presence is disabled, return an empty list
+            if not self.hs.config.use_presence:
+                defer.returnValue([])
+
             states = yield presence_handler.get_states(
                 [m.user_id for m in room_members],
                 as_event=True,