diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2022-05-16 16:35:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 15:35:31 +0000 |
commit | 83be72d76ca171ceb0fc381aa4548c1d9fea0dc7 (patch) | |
tree | c7d4fee54f2b7ba7993c15b6d892d9579da3d91b /synapse/handlers/pagination.py | |
parent | Avoid unnecessary copies when filtering private read receipts. (#12711) (diff) | |
download | synapse-83be72d76ca171ceb0fc381aa4548c1d9fea0dc7.tar.xz |
Add `StreamKeyType` class and replace string literals with constants (#12567)
Diffstat (limited to 'synapse/handlers/pagination.py')
-rw-r--r-- | synapse/handlers/pagination.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py index 2e30180094..6ae88add95 100644 --- a/synapse/handlers/pagination.py +++ b/synapse/handlers/pagination.py @@ -27,7 +27,7 @@ from synapse.handlers.room import ShutdownRoomResponse from synapse.metrics.background_process_metrics import run_as_background_process from synapse.storage.state import StateFilter from synapse.streams.config import PaginationConfig -from synapse.types import JsonDict, Requester +from synapse.types import JsonDict, Requester, StreamKeyType from synapse.util.async_helpers import ReadWriteLock from synapse.util.stringutils import random_string from synapse.visibility import filter_events_for_client @@ -491,7 +491,7 @@ class PaginationHandler: if leave_token.topological < curr_topo: from_token = from_token.copy_and_replace( - "room_key", leave_token + StreamKeyType.ROOM, leave_token ) await self.hs.get_federation_handler().maybe_backfill( @@ -513,7 +513,7 @@ class PaginationHandler: event_filter=event_filter, ) - next_token = from_token.copy_and_replace("room_key", next_key) + next_token = from_token.copy_and_replace(StreamKeyType.ROOM, next_key) if events: if event_filter: |