summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-05-04 13:16:15 +0100
committerErik Johnston <erik@matrix.org>2021-05-04 13:16:15 +0100
commit4caa84b279d7d88046e5da6b7b3bf4425320208a (patch)
treeac771a8b17e9ab7f23d49a3aefe10bc2a777264e
parentProcess state deltas in presence by room (diff)
downloadsynapse-4caa84b279d7d88046e5da6b7b3bf4425320208a.tar.xz
Use lists instead of sets where appropriate
-rw-r--r--synapse/handlers/presence.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 1cbe65f72d..6fd1f34289 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -1266,11 +1266,11 @@ class PresenceHandler(BasePresenceHandler):
 
         # Construct sets for all the local users and remote hosts that were
         # already in the room
-        prev_local_users = set()
+        prev_local_users = []
         prev_remote_hosts = set()
         for user_id in prev_users:
             if self.is_mine_id(user_id):
-                prev_local_users.add(user_id)
+                prev_local_users.append(user_id)
             else:
                 prev_remote_hosts.add(get_domain_from_id(user_id))
 
@@ -1278,11 +1278,11 @@ class PresenceHandler(BasePresenceHandler):
         # that were *not* already in the room. Care needs to be taken with the
         # calculating the remote hosts, as a host may have already been in the
         # room even if there is a newly joined user from that host.
-        newly_joined_local_users = set()
+        newly_joined_local_users = []
         newly_joined_remote_hosts = set()
         for user_id in newly_joined_users:
             if self.is_mine_id(user_id):
-                newly_joined_local_users.add(user_id)
+                newly_joined_local_users.append(user_id)
             else:
                 host = get_domain_from_id(user_id)
                 if host not in prev_remote_hosts: