mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 12:34:59 -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
|
@ -24,7 +24,7 @@ from synapse.api.errors import NotFoundError, SynapseError
|
|||
from synapse.api.filtering import Filter
|
||||
from synapse.events import EventBase
|
||||
from synapse.storage.state import StateFilter
|
||||
from synapse.types import JsonDict, UserID
|
||||
from synapse.types import JsonDict, StreamKeyType, UserID
|
||||
from synapse.visibility import filter_events_for_client
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -655,11 +655,11 @@ class SearchHandler:
|
|||
"events_before": events_before,
|
||||
"events_after": events_after,
|
||||
"start": await now_token.copy_and_replace(
|
||||
"room_key", res.start
|
||||
StreamKeyType.ROOM, res.start
|
||||
).to_string(self.store),
|
||||
"end": await now_token.copy_and_replace(
|
||||
StreamKeyType.ROOM, res.end
|
||||
).to_string(self.store),
|
||||
"end": await now_token.copy_and_replace("room_key", res.end).to_string(
|
||||
self.store
|
||||
),
|
||||
}
|
||||
|
||||
if include_profile:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue