This commit is contained in:
Erik Johnston 2024-09-15 11:32:40 +01:00
parent fb751d3914
commit 9a482a61a9

View file

@ -105,8 +105,6 @@ async def filter_events_for_client(
The filtered events. The `unsigned` data is annotated with the membership state
of `user_id` at each event.
"""
if not events:
return []
# Filter out events that have been soft failed so that we don't relay them
# to clients.
@ -125,6 +123,9 @@ async def filter_events_for_client(
(EventTypes.Member, user_id),
)
if not events:
return []
room_id = events[0].room_id
assert all(event.room_id == room_id for event in events)