From 2b55017d9cbb1bbbe86f2978588585ddc759f33e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 26 Jul 2024 13:06:08 +0100 Subject: REVERT --- synapse/handlers/sliding_sync.py | 24 ------------------------ synapse/rest/client/sync.py | 2 -- 2 files changed, 26 deletions(-) diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py index 4f8e6a0f8d..0d621cbdd4 100644 --- a/synapse/handlers/sliding_sync.py +++ b/synapse/handlers/sliding_sync.py @@ -622,30 +622,6 @@ class SlidingSyncHandler: else: relevant_room_map[room_id] = room_sync_config - # Filter out rooms that haven't received updates and we've sent down - # previously. - if from_token: - rooms_should_send = set() - for room_id in relevant_room_map: - status = await self.connection_store.have_sent_room( - sync_config, - from_token.connection_position, - room_id, - ) - if status.status != HaveSentRoomFlag.LIVE: - rooms_should_send.add(room_id) - - # TODO: Also check current state delta stream - rooms_that_have_updates = ( - self.store._events_stream_cache.get_entities_changed( - relevant_room_map, from_token.stream_token.room_key.stream - ) - ) - rooms_should_send.update(rooms_that_have_updates) - relevant_room_map = { - r: c for r, c in relevant_room_map.items() if r in rooms_should_send - } - # Fetch room data rooms: Dict[str, SlidingSyncResult.RoomResult] = {} diff --git a/synapse/rest/client/sync.py b/synapse/rest/client/sync.py index fcb054b970..c3f9bc3406 100644 --- a/synapse/rest/client/sync.py +++ b/synapse/rest/client/sync.py @@ -46,11 +46,9 @@ from synapse.handlers.sync import ( from synapse.http.server import HttpServer from synapse.http.servlet import ( RestServlet, - parse_and_validate_json_object_from_request, parse_boolean, parse_integer, parse_json_object_from_request, - parse_json_value_from_request, parse_string, validate_json_object, ) -- cgit 1.4.1