summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-20 17:42:11 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-20 17:42:11 +0100
commit41ac1232b5bd78f2dff5edd6c8b04c5ceb2aa87c (patch)
tree8c170802b61dcf7c200b8b4fd7b9e37a2ca51d0a /synapse/handlers/sync.py
parentMerge commit 'e00816ad9' into anoa/dinsic_release_1_21_x (diff)
parentConvert additional database code to async/await. (#8195) (diff)
downloadsynapse-41ac1232b5bd78f2dff5edd6c8b04c5ceb2aa87c.tar.xz
Merge commit '5c03134d0' into anoa/dinsic_release_1_21_x
* commit '5c03134d0':
  Convert additional database code to async/await. (#8195)
  Define StateMap as immutable and add a MutableStateMap type. (#8183)
  Move and refactor LoginRestServlet helper methods (#8182)
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py

index c42dac18f5..9a86eb01c9 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py
@@ -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.