summary refs log tree commit diff
path: root/synapse/visibility.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-08-24 13:52:41 +0100
committerGitHub <noreply@github.com>2016-08-24 13:52:41 +0100
commitd89f8683dc873c97fc8e046b2eec200a9be0230c (patch)
tree19e005a8ff177a3d0d6ee6eae0ea5c03e775a047 /synapse/visibility.py
parentMerge pull request #1040 from matrix-org/erikj/pagination (diff)
parentRemove tracer (diff)
downloadsynapse-d89f8683dc873c97fc8e046b2eec200a9be0230c.tar.xz
Merge pull request #1042 from matrix-org/erikj/preserve_log_contexts
Preserve some logcontexts
Diffstat (limited to 'synapse/visibility.py')
-rw-r--r--synapse/visibility.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/visibility.py b/synapse/visibility.py
index 948ad51772..cc12c0a23d 100644
--- a/synapse/visibility.py
+++ b/synapse/visibility.py
@@ -17,7 +17,7 @@ from twisted.internet import defer
 
 from synapse.api.constants import Membership, EventTypes
 
-from synapse.util.logcontext import preserve_fn
+from synapse.util.logcontext import preserve_fn, preserve_context_over_deferred
 
 import logging
 
@@ -55,12 +55,12 @@ def filter_events_for_clients(store, user_tuples, events, event_id_to_state):
             given events
         events ([synapse.events.EventBase]): list of events to filter
     """
-    forgotten = yield defer.gatherResults([
+    forgotten = yield preserve_context_over_deferred(defer.gatherResults([
         preserve_fn(store.who_forgot_in_room)(
             room_id,
         )
         for room_id in frozenset(e.room_id for e in events)
-    ], consumeErrors=True)
+    ], consumeErrors=True))
 
     # Set of membership event_ids that have been forgotten
     event_id_forgotten = frozenset(