diff options
author | Erik Johnston <erik@matrix.org> | 2017-03-28 10:41:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-03-30 14:14:36 +0100 |
commit | 86780a8bc3eac566d2c03a601f84b5ccf5737ceb (patch) | |
tree | 196cf1307a234245d4d1642509f64a2f98c09ca5 /synapse/visibility.py | |
parent | Fix the logcontext handling in the cache wrappers (#2077) (diff) | |
download | synapse-86780a8bc3eac566d2c03a601f84b5ccf5737ceb.tar.xz |
Don't convert to deferreds when not necessary
Diffstat (limited to '')
-rw-r--r-- | synapse/visibility.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/visibility.py b/synapse/visibility.py index 31659156ae..c4dd9ae2c7 100644 --- a/synapse/visibility.py +++ b/synapse/visibility.py @@ -56,7 +56,8 @@ def filter_events_for_clients(store, user_tuples, events, event_id_to_state): events ([synapse.events.EventBase]): list of events to filter """ forgotten = yield preserve_context_over_deferred(defer.gatherResults([ - preserve_fn(store.who_forgot_in_room)( + defer.maybeDeferred( + preserve_fn(store.who_forgot_in_room), room_id, ) for room_id in frozenset(e.room_id for e in events) |