From ef1307728d6036db05c53ef6a490498b93cdca11 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Mon, 19 Oct 2026 16:28:16 +0000 Subject: [PATCH] fixup! Add a query for which rooms have sticky events in a stream range --- synapse/storage/databases/main/sticky_events.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/synapse/storage/databases/main/sticky_events.py b/synapse/storage/databases/main/sticky_events.py index 5830bf2b33..afb77c43fc 100644 --- a/synapse/storage/databases/main/sticky_events.py +++ b/synapse/storage/databases/main/sticky_events.py @@ -281,8 +281,10 @@ class StickyEventsWorkerStore(StateGroupWorkerStore, CacheInvalidationWorkerStor to_token: MultiWriterStreamToken, ) -> set[str]: """Given a set of room IDs, find out which of them have sticky events - (unexpired or not) with sticky stream positions after `from_token` and - at or before `to_token`. + in the `sticky_events` table (which may be expired and awaiting cleanup) + with sticky stream positions after `from_token` and at or before `to_token`. + + Bounds: from_token < ... <= to_token Args: room_ids: The room IDs to check.