summary refs log tree commit diff
path: root/synapse/handlers/initial_sync.py
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2021-09-22 13:35:31 +0100
committerDavid Robertson <davidr@element.io>2021-09-22 13:35:31 +0100
commita8340692aba9eab439e989d1c2512e107abe455f (patch)
treef2d206753cf79498065bef6556b870a949484bf8 /synapse/handlers/initial_sync.py
parentMerge remote-tracking branch 'origin/dmr/cache-eviction-hack' into matrix-org... (diff)
parentInclude outlier status in `str(event)` for V2/V3 events (#10879) (diff)
downloadsynapse-a8340692aba9eab439e989d1c2512e107abe455f.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/handlers/initial_sync.py')
-rw-r--r--synapse/handlers/initial_sync.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/handlers/initial_sync.py b/synapse/handlers/initial_sync.py

index 4e8f7f1d85..9ad39a65d8 100644 --- a/synapse/handlers/initial_sync.py +++ b/synapse/handlers/initial_sync.py
@@ -13,7 +13,7 @@ # limitations under the License. import logging -from typing import TYPE_CHECKING, Optional, Tuple +from typing import TYPE_CHECKING, List, Optional, Tuple from twisted.internet import defer @@ -125,7 +125,7 @@ class InitialSyncHandler(BaseHandler): now_token = self.hs.get_event_sources().get_current_token() - presence_stream = self.hs.get_event_sources().sources["presence"] + presence_stream = self.hs.get_event_sources().sources.presence presence, _ = await presence_stream.get_new_events( user, from_key=None, include_offline=False ) @@ -150,7 +150,7 @@ class InitialSyncHandler(BaseHandler): if limit is None: limit = 10 - async def handle_room(event: RoomsForUser): + async def handle_room(event: RoomsForUser) -> None: d: JsonDict = { "room_id": event.room_id, "membership": event.membership, @@ -411,9 +411,9 @@ class InitialSyncHandler(BaseHandler): presence_handler = self.hs.get_presence_handler() - async def get_presence(): + async def get_presence() -> List[JsonDict]: # If presence is disabled, return an empty list - if not self.hs.config.use_presence: + if not self.hs.config.server.use_presence: return [] states = await presence_handler.get_states( @@ -428,7 +428,7 @@ class InitialSyncHandler(BaseHandler): for s in states ] - async def get_receipts(): + async def get_receipts() -> List[JsonDict]: receipts = await self.store.get_linearized_receipts_for_room( room_id, to_key=now_token.receipt_key )