diff options
author | Erik Johnston <erik@matrix.org> | 2024-07-30 12:50:37 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2024-07-30 12:50:37 +0100 |
commit | ce09ef058bc7bf0358bbc5e090035f2fc5995669 (patch) | |
tree | f1cc8ea49bcbacb6c7a68279df92a7b9d435af81 | |
parent | Add fast path if from_token is None (diff) | |
download | synapse-ce09ef058bc7bf0358bbc5e090035f2fc5995669.tar.xz |
Only mark as updated if entry has changed
-rw-r--r-- | synapse/handlers/sliding_sync.py | 4 |
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: |