mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-20 14:30:20 -04:00
Add StreamKeyType
class and replace string literals with constants (#12567)
This commit is contained in:
parent
3ce15cc7be
commit
83be72d76c
19 changed files with 125 additions and 80 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue