summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/stream.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index da43bb1321..ecd39074b8 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -346,9 +346,9 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
         defer.returnValue(ret)
 
     @defer.inlineCallbacks
-    def get_recent_events_for_room(self, room_id, limit, end_token, from_token=None):
+    def get_recent_events_for_room(self, room_id, limit, end_token):
         rows, token = yield self.get_recent_event_ids_for_room(
-            room_id, limit, end_token, from_token
+            room_id, limit, end_token,
         )
 
         logger.debug("stream before")
@@ -363,14 +363,13 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
         defer.returnValue((events, token))
 
     @defer.inlineCallbacks
-    def get_recent_event_ids_for_room(self, room_id, limit, end_token, from_token=None):
+    def get_recent_event_ids_for_room(self, room_id, limit, end_token):
         """Get the most recent events in the room in topological ordering.
 
         Args:
             room_id (str)
             limit (int)
             end_token (str): The stream token representing now.
-            from_token(str|None): Token to not return events before, if given.
 
         Returns:
             Deferred[tuple[list[dict], tuple[str, str]]]: Returns a list of
@@ -384,12 +383,10 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
             defer.returnValue(([], (end_token, end_token)))
 
         end_token = RoomStreamToken.parse_stream_token(end_token)
-        if from_token is not None:
-            from_token = RoomStreamToken.parse(from_token)
 
         rows, token = yield self.runInteraction(
             "get_recent_event_ids_for_room", self._paginate_room_events_txn,
-            room_id, from_token=end_token, to_token=from_token, limit=limit,
+            room_id, from_token=end_token, limit=limit,
         )
 
         # We want to return the results in ascending order.