summary refs log tree commit diff
diff options
context:
space:
mode:
authorTravis Ralston <travpc@gmail.com>2019-09-05 22:10:57 -0600
committerTravis Ralston <travpc@gmail.com>2019-09-05 22:10:57 -0600
commitc4f3e97879aa30a662b3c6d263145e6aac7113b8 (patch)
treed041affab3a2e27cc9204da8df2ac64cbffb3e71
parentFilter out hidden read receipts from sync too (diff)
downloadsynapse-github/travis/hidden_rr.tar.xz
-rw-r--r--synapse/handlers/initial_sync.py3
-rw-r--r--synapse/handlers/sync.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/initial_sync.py b/synapse/handlers/initial_sync.py

index 8fbb77c0ab..7dcc1c3c35 100644 --- a/synapse/handlers/initial_sync.py +++ b/synapse/handlers/initial_sync.py
@@ -397,7 +397,8 @@ class InitialSyncHandler(BaseHandler): receipts = [] return [ - r for r in receipts + r + for r in receipts if not r.data.get("hidden", False) or r.user_id == user_id ] diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index e8859ee3d6..d421bc964c 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py
@@ -379,10 +379,10 @@ class SyncHandler(object): event_copy = {k: v for (k, v) in iteritems(event) if k != "room_id"} # filter out receipts the user shouldn't see - content = event_copy.get('content', {}) + content = event_copy.get("content", {}) event_ids = content.keys() reconstructed = event_copy.copy() - reconstructed['content'] = {} # clear old content + reconstructed["content"] = {} # clear old content for event_id in event_ids: m_read = content[event_id].get("m.read", None) if m_read is None: