From 50bc18bbcf5e034d2e6e00bdd37a794f8b1a0a09 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 4 Oct 2024 10:48:57 +0100 Subject: [PATCH] Only check joined rooms --- synapse/handlers/sliding_sync/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/synapse/handlers/sliding_sync/__init__.py b/synapse/handlers/sliding_sync/__init__.py index cb6a0b9f35f..0033a7c4b9d 100644 --- a/synapse/handlers/sliding_sync/__init__.py +++ b/synapse/handlers/sliding_sync/__init__.py @@ -297,7 +297,13 @@ async def handle_room(room_id: str) -> None: if from_token: # The set of rooms that the client (may) care about, but aren't # in any list range (or subscribed to). - missing_rooms = all_rooms - relevant_room_map.keys() + missing_rooms = { + room_id + for room_id in all_rooms - relevant_room_map.keys() + # We only care about updates to *joined* rooms + if room_membership_for_user_map[room_id].membership + == Membership.JOIN + } # We now just go and try fetching any events in the above rooms # to see if anything has happened since the `from_token`.