mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 16:42:13 -04:00
Add a type hint for get_device_handler()
and fix incorrect types. (#14055)
This was the last untyped handler from the HomeServer object. Since it was being treated as Any (and thus unchecked) it was being used incorrectly in a few places.
This commit is contained in:
parent
9b4cb1e2ed
commit
6d47b7e325
16 changed files with 185 additions and 77 deletions
|
@ -38,6 +38,7 @@ from synapse.api.errors import (
|
|||
)
|
||||
from synapse.appservice import ApplicationService
|
||||
from synapse.config.server import is_threepid_reserved
|
||||
from synapse.handlers.device import DeviceHandler
|
||||
from synapse.http.servlet import assert_params_in_dict
|
||||
from synapse.replication.http.login import RegisterDeviceReplicationServlet
|
||||
from synapse.replication.http.register import (
|
||||
|
@ -841,6 +842,9 @@ class RegistrationHandler:
|
|||
refresh_token = None
|
||||
refresh_token_id = None
|
||||
|
||||
# This can only run on the main process.
|
||||
assert isinstance(self.device_handler, DeviceHandler)
|
||||
|
||||
registered_device_id = await self.device_handler.check_device_registered(
|
||||
user_id,
|
||||
device_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue