mirror of
https://github.com/element-hq/synapse.git
synced 2025-03-10 01:46:51 +00:00
Deduplicate presence entries in sync (#818)
This commit is contained in:
parent
70599ce925
commit
661a540dd1
1 changed files with 3 additions and 0 deletions
|
@ -637,6 +637,9 @@ class SyncHandler(object):
|
||||||
)
|
)
|
||||||
presence.extend(states)
|
presence.extend(states)
|
||||||
|
|
||||||
|
# Deduplicate the presence entries so that there's at most one per user
|
||||||
|
presence = {p["content"]["user_id"]: p for p in presence}.values()
|
||||||
|
|
||||||
presence = sync_config.filter_collection.filter_presence(
|
presence = sync_config.filter_collection.filter_presence(
|
||||||
presence
|
presence
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue