mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:36:02 -04:00
Run Black. (#5482)
This commit is contained in:
parent
7dcf984075
commit
32e7c9e7f2
376 changed files with 9142 additions and 10388 deletions
|
@ -21,6 +21,7 @@ class ModuleApi(object):
|
|||
"""A proxy object that gets passed to password auth providers so they
|
||||
can register new users etc if necessary.
|
||||
"""
|
||||
|
||||
def __init__(self, hs, auth_handler):
|
||||
self.hs = hs
|
||||
|
||||
|
@ -57,7 +58,7 @@ class ModuleApi(object):
|
|||
Returns:
|
||||
str: qualified @user:id
|
||||
"""
|
||||
if username.startswith('@'):
|
||||
if username.startswith("@"):
|
||||
return username
|
||||
return UserID(username, self.hs.hostname).to_string()
|
||||
|
||||
|
@ -89,8 +90,7 @@ class ModuleApi(object):
|
|||
# Register the user
|
||||
reg = self.hs.get_registration_handler()
|
||||
user_id, access_token = yield reg.register(
|
||||
localpart=localpart, default_display_name=displayname,
|
||||
bind_emails=emails,
|
||||
localpart=localpart, default_display_name=displayname, bind_emails=emails
|
||||
)
|
||||
|
||||
defer.returnValue((user_id, access_token))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue