summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-07-26 13:06:08 +0100
committerErik Johnston <erik@matrix.org>2024-07-26 13:06:08 +0100
commit2b55017d9cbb1bbbe86f2978588585ddc759f33e (patch)
tree61e12cab17680325bf00010c09c9116e07b7038c
parentMerge branch 'erikj/ss_noop_rooms' into erikj/ss_hacks (diff)
downloadsynapse-2b55017d9cbb1bbbe86f2978588585ddc759f33e.tar.xz
REVERT
-rw-r--r--synapse/handlers/sliding_sync.py24
-rw-r--r--synapse/rest/client/sync.py2
2 files changed, 0 insertions, 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,
 )