mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-19 06:34:07 -04:00
Define StateMap as immutable and add a MutableStateMap type. (#8183)
This commit is contained in:
parent
2c2e649be2
commit
d5e73cb6aa
8 changed files with 52 additions and 32 deletions
|
@ -31,6 +31,7 @@ from synapse.storage.state import StateFilter
|
|||
from synapse.types import (
|
||||
Collection,
|
||||
JsonDict,
|
||||
MutableStateMap,
|
||||
RoomStreamToken,
|
||||
StateMap,
|
||||
StreamToken,
|
||||
|
@ -588,7 +589,7 @@ class SyncHandler(object):
|
|||
room_id: str,
|
||||
sync_config: SyncConfig,
|
||||
batch: TimelineBatch,
|
||||
state: StateMap[EventBase],
|
||||
state: MutableStateMap[EventBase],
|
||||
now_token: StreamToken,
|
||||
) -> Optional[JsonDict]:
|
||||
""" Works out a room summary block for this room, summarising the number
|
||||
|
@ -736,7 +737,7 @@ class SyncHandler(object):
|
|||
since_token: Optional[StreamToken],
|
||||
now_token: StreamToken,
|
||||
full_state: bool,
|
||||
) -> StateMap[EventBase]:
|
||||
) -> MutableStateMap[EventBase]:
|
||||
""" Works out the difference in state between the start of the timeline
|
||||
and the previous sync.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue