mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-10 04:52:06 -05:00
Generate historic pagination token for /messages when no ?from token provided (#12370)
This commit is contained in:
parent
573cd0f92f
commit
793d03e2c5
6 changed files with 26 additions and 14 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue