From c4f3e97879aa30a662b3c6d263145e6aac7113b8 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 5 Sep 2019 22:10:57 -0600 Subject: Appease the linter --- synapse/handlers/initial_sync.py | 3 ++- synapse/handlers/sync.py | 4 ++-- 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: -- cgit 1.5.1