mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:56:02 -04:00
Remove access-token support from RegistrationHandler.register (#5641)
Nothing uses this now, so we can remove the dead code, and clean up the API. Since we're changing the shape of the return value anyway, we take the opportunity to give the method a better name.
This commit is contained in:
parent
43d175d17a
commit
824707383b
8 changed files with 44 additions and 81 deletions
|
@ -103,7 +103,6 @@ class ModuleApi(object):
|
|||
_, access_token = yield self.register_device(user_id)
|
||||
defer.returnValue((user_id, access_token))
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def register_user(self, localpart, displayname=None, emails=[]):
|
||||
"""Registers a new user with given localpart and optional displayname, emails.
|
||||
|
||||
|
@ -115,15 +114,10 @@ class ModuleApi(object):
|
|||
Returns:
|
||||
Deferred[str]: user_id
|
||||
"""
|
||||
user_id, _ = yield self.hs.get_registration_handler().register(
|
||||
localpart=localpart,
|
||||
default_display_name=displayname,
|
||||
bind_emails=emails,
|
||||
generate_token=False,
|
||||
return self.hs.get_registration_handler().register_user(
|
||||
localpart=localpart, default_display_name=displayname, bind_emails=emails
|
||||
)
|
||||
|
||||
defer.returnValue(user_id)
|
||||
|
||||
def register_device(self, user_id, device_id=None, initial_display_name=None):
|
||||
"""Register a device for a user and generate an access token.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue