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/replication/http | |
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/replication/http')
-rw-r--r-- | synapse/replication/http/login.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/synapse/replication/http/login.py b/synapse/replication/http/login.py index 4c81e2d784..36071feb36 100644 --- a/synapse/replication/http/login.py +++ b/synapse/replication/http/login.py @@ -36,7 +36,9 @@ class RegisterDeviceReplicationServlet(ReplicationEndpoint): self.registration_handler = hs.get_registration_handler() @staticmethod - async def _serialize_payload(user_id, device_id, initial_display_name, is_guest): + async def _serialize_payload( + user_id, device_id, initial_display_name, is_guest, is_appservice_ghost + ): """ Args: device_id (str|None): Device ID to use, if None a new one is @@ -48,6 +50,7 @@ class RegisterDeviceReplicationServlet(ReplicationEndpoint): "device_id": device_id, "initial_display_name": initial_display_name, "is_guest": is_guest, + "is_appservice_ghost": is_appservice_ghost, } async def _handle_request(self, request, user_id): @@ -56,9 +59,14 @@ class RegisterDeviceReplicationServlet(ReplicationEndpoint): device_id = content["device_id"] initial_display_name = content["initial_display_name"] is_guest = content["is_guest"] + is_appservice_ghost = content["is_appservice_ghost"] device_id, access_token = await self.registration_handler.register_device( - user_id, device_id, initial_display_name, is_guest + user_id, + device_id, + initial_display_name, + is_guest, + is_appservice_ghost=is_appservice_ghost, ) return 200, {"device_id": device_id, "access_token": access_token} |