diff options
Diffstat (limited to 'synapse/handlers/pagination.py')
-rw-r--r-- | synapse/handlers/pagination.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py index 876b879483..7ee3340373 100644 --- a/synapse/handlers/pagination.py +++ b/synapse/handlers/pagination.py @@ -441,7 +441,14 @@ class PaginationHandler: if pagin_config.from_token: from_token = pagin_config.from_token else: - from_token = self.hs.get_event_sources().get_current_token_for_pagination() + from_token = ( + await self.hs.get_event_sources().get_current_token_for_pagination( + room_id + ) + ) + # We expect `/messages` to use historic pagination tokens by default but + # `/messages` should still works with live tokens when manually provided. + assert from_token.room_key.topological if pagin_config.limit is None: # This shouldn't happen as we've set a default limit before this |