summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-07-30 12:50:37 +0100
committerErik Johnston <erik@matrix.org>2024-07-30 12:50:37 +0100
commitce09ef058bc7bf0358bbc5e090035f2fc5995669 (patch)
treef1cc8ea49bcbacb6c7a68279df92a7b9d435af81
parentAdd fast path if from_token is None (diff)
downloadsynapse-ce09ef058bc7bf0358bbc5e090035f2fc5995669.tar.xz
Only mark as updated if entry has changed
-rw-r--r--synapse/handlers/sliding_sync.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py
index b1bede894d..e4c438f6c8 100644
--- a/synapse/handlers/sliding_sync.py
+++ b/synapse/handlers/sliding_sync.py
@@ -2342,8 +2342,10 @@ class SlidingSyncConnectionStore:
         # end we can treat this as a noop.
         have_updated = False
         for room_id in sent_room_ids:
+            prev_state = new_room_statuses.get(room_id)
             new_room_statuses[room_id] = HaveSentRoom.live()
-            have_updated = True
+            if prev_state != new_room_statuses[room_id]:
+                have_updated = True
 
         # Whether we add/update the entries for unsent rooms depends on the
         # existing entry: