diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-06-02 15:20:28 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-06-02 15:20:28 +0100 |
commit | 661a540dd1de89a3ab3a8f6ca0f780ea7d264176 (patch) | |
tree | bda20c33f8f639c86a67114cf94ef1a8e28349ef /synapse/handlers/sync.py | |
parent | Allow external processes to mark a user as syncing. (#812) (diff) | |
download | synapse-661a540dd1de89a3ab3a8f6ca0f780ea7d264176.tar.xz |
Deduplicate presence entries in sync (#818)
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r-- | synapse/handlers/sync.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index 3b89582d79..5307b62b85 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -637,6 +637,9 @@ class SyncHandler(object): ) 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 ) |