summary refs log tree commit diff
path: root/synapse/storage/databases/main/stream.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-07-30 09:31:42 +0100
committerErik Johnston <erik@matrix.org>2024-07-30 09:31:42 +0100
commit9cdfb4e08d7fd7edd3f0705410ba978778b4a6d7 (patch)
treef0057eac637b410a75e0e34bca82b1175a356fa2 /synapse/storage/databases/main/stream.py
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parentOnly send rooms with updates down sliding sync (#17479) (diff)
downloadsynapse-9cdfb4e08d7fd7edd3f0705410ba978778b4a6d7.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/storage/databases/main/stream.py')
-rw-r--r--synapse/storage/databases/main/stream.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/stream.py b/synapse/storage/databases/main/stream.py

index b034361aec..4207e73c7f 100644 --- a/synapse/storage/databases/main/stream.py +++ b/synapse/storage/databases/main/stream.py
@@ -2104,3 +2104,13 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore): return RoomStreamToken(stream=last_position.stream - 1) return None + + def get_rooms_that_might_have_updates( + self, room_ids: StrCollection, from_token: RoomStreamToken + ) -> StrCollection: + """Filters given room IDs down to those that might have updates, i.e. + removes rooms that definitely do not have updates. + """ + return self._events_stream_cache.get_entities_changed( + room_ids, from_token.stream + )