summary refs log tree commit diff
path: root/synapse/handlers/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-24 11:46:22 +0000
committerErik Johnston <erik@matrix.org>2017-03-24 11:46:24 +0000
commit7fc1f1e2b68ad45e74bec122c31e30efd64599af (patch)
tree90710050cfa75c974418a104c96ef440f8eec90a /synapse/handlers/presence.py
parentMerge pull request #2054 from matrix-org/erikj/user_iter_cursor (diff)
downloadsynapse-7fc1f1e2b68ad45e74bec122c31e30efd64599af.tar.xz
Cache hosts in room
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r--synapse/handlers/presence.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 059260a8aa..1ede117c79 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -575,8 +575,7 @@ class PresenceHandler(object):
                 if not local_states:
                     continue
 
-                users = yield self.store.get_users_in_room(room_id)
-                hosts = set(get_domain_from_id(u) for u in users)
+                hosts = yield self.store.get_hosts_in_room(room_id)
 
                 for host in hosts:
                     hosts_to_states.setdefault(host, []).extend(local_states)