summary refs log tree commit diff
path: root/synapse/handlers/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-04-11 15:28:24 +0100
committerErik Johnston <erik@matrix.org>2017-04-11 15:28:24 +0100
commit2be8a281d2aac8e2e3829b9aff6eb366506d22d1 (patch)
treeca480d295c88b33761b0ccde90ddf39207a2de33 /synapse/handlers/presence.py
parentMove get_interested_remotes back to presence handler (diff)
downloadsynapse-2be8a281d2aac8e2e3829b9aff6eb366506d22d1.tar.xz
Comments
Diffstat (limited to '')
-rw-r--r--synapse/handlers/presence.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 685373ff28..98e736be5b 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -666,7 +666,7 @@ class PresenceHandler(object):
         """Sends state updates to remote servers.
 
         Args:
-            hosts_to_states (list): list(state)
+            hosts_to_states (list(UserPresenceState))
         """
         self.federation.send_presence(states)
 
@@ -1332,6 +1332,8 @@ def get_interested_remotes(store, states):
         each row the list of UserPresenceState should be sent to each
         destination
     """
+    hosts_and_states = []  # Final result to return
+
     # First we look up the rooms each user is in (as well as any explicit
     # subscriptions), then for each distinct room we look up the remote
     # hosts in those rooms.
@@ -1348,7 +1350,6 @@ def get_interested_remotes(store, states):
         for u in plist:
             users_to_states.setdefault(u, []).append(state)
 
-    hosts_and_states = []
     for room_id, states in room_ids_to_states.items():
         if not local_states:
             continue