From 706e474cd900cdf52e3a67be0b88a1995ba7b3be Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Mon, 20 Jul 2026 18:37:46 +0100 Subject: [PATCH] stuff --- .../storage/databases/main/sticky_events.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/synapse/storage/databases/main/sticky_events.py b/synapse/storage/databases/main/sticky_events.py index 3d34eeab53..460d171b4a 100644 --- a/synapse/storage/databases/main/sticky_events.py +++ b/synapse/storage/databases/main/sticky_events.py @@ -742,10 +742,16 @@ class StickyEventsWorkerStore(StateGroupWorkerStore, CacheInvalidationWorkerStor with sticky event stream positions <= `max_sent_sticky_events_stream_position`. """ - def _txn(txn: LoggingTransaction) -> None: - # TODO - pass - - return await self.db_pool.runInteraction( - "mark_backlogged_sticky_events_sent", _txn + await self.db_pool.simple_upsert( + desc="mark_backlogged_sticky_events_sent", + table="destination_room_sticky_events_backlog", + keyvalues={ + "destination": destination, + "room_id": room_id.to_string(), + }, + values={ + # TODO not super nice + "sticky_events_stream_position": max_sent_sticky_events_stream_position + + 1, + }, )