diff options
author | Eric Eastwood <erice@element.io> | 2022-04-06 05:40:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 11:40:28 +0100 |
commit | 793d03e2c5c8e688380b8070d53a7e500b7734af (patch) | |
tree | d417032e5e8df81946bd1a9a453965e5ffa66d5e /synapse/streams/events.py | |
parent | Add missing dependency on importlib_metadata (#12384) (diff) | |
download | synapse-793d03e2c5c8e688380b8070d53a7e500b7734af.tar.xz |
Generate historic pagination token for `/messages` when no `?from` token provided (#12370)
Diffstat (limited to 'synapse/streams/events.py')
-rw-r--r-- | synapse/streams/events.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/streams/events.py b/synapse/streams/events.py index fb8fe17295..acf17ba623 100644 --- a/synapse/streams/events.py +++ b/synapse/streams/events.py @@ -69,7 +69,7 @@ class EventSources: ) return token - def get_current_token_for_pagination(self) -> StreamToken: + async def get_current_token_for_pagination(self, room_id: str) -> StreamToken: """Get the current token for a given room to be used to paginate events. @@ -80,7 +80,7 @@ class EventSources: The current token for pagination. """ token = StreamToken( - room_key=self.sources.room.get_current_key(), + room_key=await self.sources.room.get_current_key_for_room(room_id), presence_key=0, typing_key=0, receipt_key=0, |