summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index e92b2eafd5..899bb63114 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -874,8 +874,10 @@ class RoomContextHandler(object):
             room_id, event_id, before_limit, after_limit, event_filter
         )
 
-        results["events_before"] = yield filter_evts(results["events_before"])
-        results["events_after"] = yield filter_evts(results["events_after"])
+        filtered_before_events = event_filter.filter(results["events_before"])
+        results["events_before"] = yield filter_evts(filtered_before_events)
+        filtered_after_events = event_filter.filter(results["events_after"])
+        results["events_after"] = yield filter_evts(filtered_after_events)
         results["event"] = event
 
         if results["events_after"]: