From 81c44aee1f48d4c7b58ff9f18ef80eae023b8b0e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 11 Jul 2024 11:48:48 +0100 Subject: Fixup --- synapse/handlers/sliding_sync.py | 4 ++++ synapse/storage/schema/main/delta/85/07_sliding_sync.sql | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'synapse') diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index 02a69d6e02..642369f624 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -1052,6 +1052,10 @@ class SlidingSyncHandler: if stream_pos is not None: last_activity_in_room_map[room_id] = stream_pos + for room_id in sync_room_map.keys() - last_activity_in_room_map.keys(): + # TODO: Handle better + last_activity_in_room_map[room_id] = sync_room_map[room_id].event_pos.stream + return sorted( sync_room_map.values(), # Sort by the last activity (stream_ordering) in the room diff --git a/synapse/storage/schema/main/delta/85/07_sliding_sync.sql b/synapse/storage/schema/main/delta/85/07_sliding_sync.sql index 0c24d6ca31..d8219aa922 100644 --- a/synapse/storage/schema/main/delta/85/07_sliding_sync.sql +++ b/synapse/storage/schema/main/delta/85/07_sliding_sync.sql @@ -12,7 +12,7 @@ -- . CREATE TABLE sliding_sync_room_metadata ( - room_id BIGINT NOT NULL PRIMARY KEY, + room_id TEXT NOT NULL PRIMARY KEY, last_stream_ordering BIGINT ); -- cgit 1.5.1