diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-17 12:18:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 12:18:01 -0400 |
commit | 050e20e7ca56c3a5985fdcf64012800c153260f2 (patch) | |
tree | 514cb57562e94f61c70a25c205113b728f0d3178 /synapse/storage/databases/main/registration.py | |
parent | Use the default templates when a custom template file cannot be found (#8037) (diff) | |
download | synapse-050e20e7ca56c3a5985fdcf64012800c153260f2.tar.xz |
Convert some of the general database methods to async (#8100)
Diffstat (limited to 'synapse/storage/databases/main/registration.py')
-rw-r--r-- | synapse/storage/databases/main/registration.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/synapse/storage/databases/main/registration.py b/synapse/storage/databases/main/registration.py index de50fa6e94..068ad22b30 100644 --- a/synapse/storage/databases/main/registration.py +++ b/synapse/storage/databases/main/registration.py @@ -17,9 +17,7 @@ import logging import re -from typing import Dict, List, Optional - -from twisted.internet.defer import Deferred +from typing import Awaitable, Dict, List, Optional from synapse.api.constants import UserTypes from synapse.api.errors import Codes, StoreError, SynapseError, ThreepidValidationError @@ -563,7 +561,7 @@ class RegistrationWorkerStore(SQLBaseStore): id_server (str) Returns: - Deferred + Awaitable """ # We need to use an upsert, in case they user had already bound the # threepid @@ -1084,7 +1082,7 @@ class RegistrationStore(RegistrationBackgroundUpdateStore): def record_user_external_id( self, auth_provider: str, external_id: str, user_id: str - ) -> Deferred: + ) -> Awaitable: """Record a mapping from an external user id to a mxid Args: |