Cache hosts in room

This commit is contained in:
Erik Johnston 2017-03-24 11:46:22 +00:00
parent 57cfa513f5
commit 7fc1f1e2b6
2 changed files with 11 additions and 2 deletions

View file

@ -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)