mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-18 23:04:36 +01:00
Correctly filter states
This commit is contained in:
parent
42ac5f0c1a
commit
3dbaeef58c
1 changed files with 2 additions and 2 deletions
|
@ -428,7 +428,7 @@ class PresenceHandler(BaseHandler):
|
||||||
|
|
||||||
hosts_to_states = {}
|
hosts_to_states = {}
|
||||||
for room_id, states in room_ids_to_states.items():
|
for room_id, states in room_ids_to_states.items():
|
||||||
local_states = filter(self.hs.is_mine_id, states)
|
local_states = filter(lambda s: self.hs.is_mine_id(s.user_id), states)
|
||||||
if not local_states:
|
if not local_states:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ class PresenceHandler(BaseHandler):
|
||||||
hosts_to_states.setdefault(host, []).extend(local_states)
|
hosts_to_states.setdefault(host, []).extend(local_states)
|
||||||
|
|
||||||
for user_id, states in users_to_states.items():
|
for user_id, states in users_to_states.items():
|
||||||
local_states = filter(self.hs.is_mine_id, states)
|
local_states = filter(lambda s: self.hs.is_mine_id(s.user_id), states)
|
||||||
if not local_states:
|
if not local_states:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue