diff options
author | Erik Johnston <erik@matrix.org> | 2020-12-18 09:51:56 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2020-12-18 09:51:56 +0000 |
commit | a7a913918cf04c6d900223b19e719fafbbe94efa (patch) | |
tree | eada22da26f93fe8807a45ebb70d14bb15c80f1a /synapse/rest/client | |
parent | Try and drop stale extremities. (#8929) (diff) | |
parent | Update tests/test_mau.py (diff) | |
download | synapse-a7a913918cf04c6d900223b19e719fafbbe94efa.tar.xz |
Merge remote-tracking branch 'origin/erikj/as_mau_block' into develop
Diffstat (limited to 'synapse/rest/client')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index 9041e7ed76..6b5a1b7109 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -655,9 +655,13 @@ class RegisterRestServlet(RestServlet): user_id = await self.registration_handler.appservice_register( username, as_token ) - return await self._create_registration_details(user_id, body) + return await self._create_registration_details( + user_id, body, is_appservice_ghost=True, + ) - async def _create_registration_details(self, user_id, params): + async def _create_registration_details( + self, user_id, params, is_appservice_ghost=False + ): """Complete registration of newly-registered user Allocates device_id if one was not given; also creates access_token. @@ -674,7 +678,11 @@ class RegisterRestServlet(RestServlet): device_id = params.get("device_id") initial_display_name = params.get("initial_device_display_name") device_id, access_token = await self.registration_handler.register_device( - user_id, device_id, initial_display_name, is_guest=False + user_id, + device_id, + initial_display_name, + is_guest=False, + is_appservice_ghost=is_appservice_ghost, ) result.update({"access_token": access_token, "device_id": device_id}) |