summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/handlers/sync.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index d960078e7a..ec8d78ba8c 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -334,17 +334,10 @@ class SyncHandler(BaseHandler):
 
             return True
 
-        event_and_state = filter(
-            allowed,
-            [
-                (e, event_id_to_state[e.event_id])
-                for e in events
-            ]
-        )
-
         defer.returnValue([
-            ev
-            for ev, _ in event_and_state
+            event
+            for event in events
+            if allowed(event, event_id_to_state[event.event_id])
         ])
 
     @defer.inlineCallbacks