summary refs log tree commit diff
path: root/synapse/visibility.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2018-07-25 17:27:49 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-07-25 17:27:49 +0100
commit2565804030b14eab5f1455e8a860c1fbd71d45fc (patch)
tree7cdac37c0d7a0611b54f32312fdf5028c0c91b44 /synapse/visibility.py
parentflake8 (diff)
parentMerge pull request #3603 from matrix-org/erikj/handle_outliers (diff)
downloadsynapse-2565804030b14eab5f1455e8a860c1fbd71d45fc.tar.xz
Merge branch 'develop' into matthew/filter_members
Diffstat (limited to 'synapse/visibility.py')
-rw-r--r--synapse/visibility.py19
1 files changed, 1 insertions, 18 deletions
diff --git a/synapse/visibility.py b/synapse/visibility.py
index ba0499a022..d4680863d3 100644
--- a/synapse/visibility.py
+++ b/synapse/visibility.py
@@ -24,7 +24,6 @@ from twisted.internet import defer
 from synapse.api.constants import EventTypes, Membership
 from synapse.events.utils import prune_event
 from synapse.types import get_domain_from_id
-from synapse.util.logcontext import make_deferred_yieldable, preserve_fn
 
 logger = logging.getLogger(__name__)
 
@@ -76,19 +75,6 @@ def filter_events_for_client(store, user_id, events, is_peeking=False,
         types=types,
     )
 
-    forgotten = yield make_deferred_yieldable(defer.gatherResults([
-        defer.maybeDeferred(
-            preserve_fn(store.who_forgot_in_room),
-            room_id,
-        )
-        for room_id in frozenset(e.room_id for e in events)
-    ], consumeErrors=True))
-
-    # Set of membership event_ids that have been forgotten
-    event_id_forgotten = frozenset(
-        row["event_id"] for rows in forgotten for row in rows
-    )
-
     ignore_dict_content = yield store.get_global_account_data_by_type_for_user(
         "m.ignored_user_list", user_id,
     )
@@ -177,10 +163,7 @@ def filter_events_for_client(store, user_id, events, is_peeking=False,
         if membership is None:
             membership_event = state.get((EventTypes.Member, user_id), None)
             if membership_event:
-                # XXX why do we do this?
-                # https://github.com/matrix-org/synapse/issues/3350
-                if membership_event.event_id not in event_id_forgotten:
-                    membership = membership_event.membership
+                membership = membership_event.membership
 
         # if the user was a member of the room at the time of the event,
         # they can see it.