summary refs log tree commit diff
path: root/synapse/visibility.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-07-07 14:04:40 +0100
committerErik Johnston <erik@matrix.org>2017-07-07 14:04:40 +0100
commitf502b0dea14ea07bad1e1e0f5a6d00f19df1c6c0 (patch)
tree790b0ff43d9a926105bcd4e64cd02583234c2c1e /synapse/visibility.py
parentMerge pull request #2342 from matrix-org/erikj/pusher_pool_instantiate (diff)
downloadsynapse-f502b0dea14ea07bad1e1e0f5a6d00f19df1c6c0.tar.xz
Perf: Don't filter events for push
We know the users are joined and we can explicitly check for if they are
ignoring the user, so lets do that.
Diffstat (limited to 'synapse/visibility.py')
-rw-r--r--synapse/visibility.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/synapse/visibility.py b/synapse/visibility.py
index c4dd9ae2c7..5590b866ed 100644
--- a/synapse/visibility.py
+++ b/synapse/visibility.py
@@ -189,25 +189,6 @@ def filter_events_for_clients(store, user_tuples, events, event_id_to_state):
 
 
 @defer.inlineCallbacks
-def filter_events_for_clients_context(store, user_tuples, events, event_id_to_context):
-    user_ids = set(u[0] for u in user_tuples)
-    event_id_to_state = {}
-    for event_id, context in event_id_to_context.items():
-        state = yield store.get_events([
-            e_id
-            for key, e_id in context.current_state_ids.iteritems()
-            if key == (EventTypes.RoomHistoryVisibility, "")
-            or (key[0] == EventTypes.Member and key[1] in user_ids)
-        ])
-        event_id_to_state[event_id] = state
-
-    res = yield filter_events_for_clients(
-        store, user_tuples, events, event_id_to_state
-    )
-    defer.returnValue(res)
-
-
-@defer.inlineCallbacks
 def filter_events_for_client(store, user_id, events, is_peeking=False):
     """
     Check which events a user is allowed to see