mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-20 02:44:11 -04:00
fix style inconsistencies
This commit is contained in:
parent
663d9db8e7
commit
ea69a84bbb
4 changed files with 51 additions and 18 deletions
|
@ -474,6 +474,15 @@ class RegistrationStore(RegistrationWorkerStore,
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def get_user_id_by_threepid(self, medium, address):
|
||||
"""Returns user id from threepid
|
||||
|
||||
Args:
|
||||
medium (str): threepid medium e.g. email
|
||||
address (str): threepid address e.g. me@example.com
|
||||
|
||||
Returns:
|
||||
Deferred[str|None]: user id or None if no user id/threepid mapping exists
|
||||
"""
|
||||
user_id = yield self.runInteraction(
|
||||
"get_user_id_by_threepid", self.get_user_id_by_threepid_txn,
|
||||
medium, address
|
||||
|
@ -481,6 +490,16 @@ class RegistrationStore(RegistrationWorkerStore,
|
|||
defer.returnValue(user_id)
|
||||
|
||||
def get_user_id_by_threepid_txn(self, txn, medium, address):
|
||||
"""Returns user id from threepid
|
||||
|
||||
Args:
|
||||
txn (cursor):
|
||||
medium (str): threepid medium e.g. email
|
||||
address (str): threepid address e.g. me@example.com
|
||||
|
||||
Returns:
|
||||
str|None: user id or None if no user id/threepid mapping exists
|
||||
"""
|
||||
ret = self._simple_select_one_txn(
|
||||
txn,
|
||||
"user_threepids",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue