Implement message forward pagination from start when no from is given, fixes #12383 (#14149)

Fixes https://github.com/matrix-org/synapse/issues/12383
This commit is contained in:
Benjamin Kampmann 2022-11-24 09:10:51 +00:00 committed by GitHub
parent 9af2be192a
commit f6c74d1cb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 60 additions and 0 deletions

View file

@ -448,6 +448,12 @@ class PaginationHandler:
if pagin_config.from_token:
from_token = pagin_config.from_token
elif pagin_config.direction == "f":
from_token = (
await self.hs.get_event_sources().get_start_token_for_pagination(
room_id
)
)
else:
from_token = (
await self.hs.get_event_sources().get_current_token_for_pagination(