summary refs log tree commit diff
path: root/synapse/visibility.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-08-23 15:23:39 +0100
committerErik Johnston <erik@matrix.org>2016-08-24 11:58:40 +0100
commit921913935176f5bd3df5e5b960d87c94a2adb304 (patch)
treeccb7c2bddbad96b35fcb0de89b562ed0a4115a67 /synapse/visibility.py
parentMerge pull request #1039 from matrix-org/kegan/join-with-custom-content (diff)
downloadsynapse-921913935176f5bd3df5e5b960d87c94a2adb304.tar.xz
Preserve some logcontexts
Diffstat (limited to '')
-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(