summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorBenjamin Kampmann <ben.kampmann@gmail.com>2022-11-24 09:10:51 +0000
committerGitHub <noreply@github.com>2022-11-24 09:10:51 +0000
commitf6c74d1cb2ed966802b01a2b037f09ce7a842c18 (patch)
tree38fc186fc69fb64eae7fab8dbabfb90a84fd2daa /synapse/handlers
parentRemove legacy Prometheus metrics names. They were deprecated in Synapse v1.69... (diff)
downloadsynapse-f6c74d1cb2ed966802b01a2b037f09ce7a842c18.tar.xz
Implement message forward pagination from start when no from is given, fixes #12383 (#14149)
Fixes https://github.com/matrix-org/synapse/issues/12383
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/pagination.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py
index a4ca9cb8b4..c572508a02 100644
--- a/synapse/handlers/pagination.py
+++ b/synapse/handlers/pagination.py
@@ -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(