mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 20:04:54 -04:00
Fixes https://github.com/matrix-org/synapse/issues/12383
This commit is contained in:
parent
9af2be192a
commit
f6c74d1cb2
4 changed files with 60 additions and 0 deletions
|
@ -73,6 +73,19 @@ class EventSources:
|
|||
)
|
||||
return token
|
||||
|
||||
@trace
|
||||
async def get_start_token_for_pagination(self, room_id: str) -> StreamToken:
|
||||
"""Get the start token for a given room to be used to paginate
|
||||
events.
|
||||
|
||||
The returned token does not have the current values for fields other
|
||||
than `room`, since they are not used during pagination.
|
||||
|
||||
Returns:
|
||||
The start token for pagination.
|
||||
"""
|
||||
return StreamToken.START
|
||||
|
||||
@trace
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue