diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-19 12:27:35 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-19 12:27:35 +0000 |
commit | 3dbaeef58cf33f0399f40a2aa3c6205fdbe5dbd8 (patch) | |
tree | 4e89f7c6d651393b328ee055d4e9fe68f690123f /synapse | |
parent | Only send presence updates to remote hosts if user is ours (diff) | |
download | synapse-3dbaeef58cf33f0399f40a2aa3c6205fdbe5dbd8.tar.xz |
Correctly filter states
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/presence.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 451fc70b37..aed640450f 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -428,7 +428,7 @@ class PresenceHandler(BaseHandler): hosts_to_states = {} 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: continue @@ -437,7 +437,7 @@ class PresenceHandler(BaseHandler): hosts_to_states.setdefault(host, []).extend(local_states) 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: continue |