mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-27 02:19:25 -05:00
Merge pull request #1093 from matrix-org/erikj/dedupe_presence
Deduplicate presence in _update_states
This commit is contained in:
commit
ea05155a8c
@ -265,6 +265,12 @@ class PresenceHandler(object):
|
||||
to_notify = {} # Changes we want to notify everyone about
|
||||
to_federation_ping = {} # These need sending keep-alives
|
||||
|
||||
# Only bother handling the last presence change for each user
|
||||
new_states_dict = {}
|
||||
for new_state in new_states:
|
||||
new_states_dict[new_state.user_id] = new_state
|
||||
new_state = new_states_dict.values()
|
||||
|
||||
for new_state in new_states:
|
||||
user_id = new_state.user_id
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user