summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-07-11 11:48:48 +0100
committerErik Johnston <erik@matrix.org>2024-07-11 11:48:48 +0100
commit81c44aee1f48d4c7b58ff9f18ef80eae023b8b0e (patch)
treece5bf56a7e6b3e47b7172f1bb863a294fab729fb /synapse
parentFixup room types (diff)
downloadsynapse-81c44aee1f48d4c7b58ff9f18ef80eae023b8b0e.tar.xz
Fixup
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/sliding_sync.py4
-rw-r--r--synapse/storage/schema/main/delta/85/07_sliding_sync.sql2
2 files changed, 5 insertions, 1 deletions
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 @@ -- <https://www.gnu.org/licenses/agpl-3.0.html>. CREATE TABLE sliding_sync_room_metadata ( - room_id BIGINT NOT NULL PRIMARY KEY, + room_id TEXT NOT NULL PRIMARY KEY, last_stream_ordering BIGINT );