mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Deduplicate presence in _update_states
This commit is contained in:
parent
685da5a3b0
commit
6c4d582144
@ -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