We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb751d3 commit 9a482a6Copy full SHA for 9a482a6
synapse/visibility.py
@@ -105,8 +105,6 @@ async def filter_events_for_client(
105
The filtered events. The `unsigned` data is annotated with the membership state
106
of `user_id` at each event.
107
"""
108
- if not events:
109
- return []
110
111
# Filter out events that have been soft failed so that we don't relay them
112
# to clients.
@@ -125,6 +123,9 @@ async def filter_events_for_client(
125
123
(EventTypes.Member, user_id),
126
124
)
127
+ if not events:
+ return []
128
+
129
room_id = events[0].room_id
130
assert all(event.room_id == room_id for event in events)
131
0 commit comments