diff options
author | Erik Johnston <erik@matrix.org> | 2024-07-10 16:02:09 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2024-07-10 16:02:09 +0100 |
commit | f0ce47a326dee218fe4072f92a963848db90f836 (patch) | |
tree | 375a4736196ddccade935b01a2581c54ee336d0f /synapse | |
parent | Fixup (diff) | |
download | synapse-f0ce47a326dee218fe4072f92a963848db90f836.tar.xz |
Fixup
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/sliding_sync.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index 1020e4a84a..b17d42ff1f 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -1024,18 +1024,14 @@ class SlidingSyncHandler: last_activity_in_room_map[room_id] = stream_pos continue - last_event_result = await self.store.get_rough_stream_ordering_for_room( - room_id - ) + stream = await self.store.get_rough_stream_ordering_for_room(room_id) # If the room has no events at/before the `to_token`, this is probably a # mistake in the code that generates the `sync_room_map` since that should # only give us rooms that the user had membership in during the token range. - assert last_event_result is not None - - event_pos = last_event_result + assert stream is not None - last_activity_in_room_map[room_id] = event_pos.stream + last_activity_in_room_map[room_id] = stream else: # Otherwise, if the user has left/been invited/knocked/been banned from # a room, they shouldn't see anything past that point. |