diff options
author | Erik Johnston <erikj@jki.re> | 2018-08-15 10:32:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-15 10:32:12 +0100 |
commit | fef2e65d12b87d7d85d6575f7652de3b228cab8a (patch) | |
tree | bca681c3fde2a4d96d679dde4c42c06707353662 /synapse/rest/client/v1/admin.py | |
parent | Merge pull request #3692 from matrix-org/neil/fix_postgres_test_initialise_re... (diff) | |
parent | Log when we 3pid/unbind request fails (diff) | |
download | synapse-fef2e65d12b87d7d85d6575f7652de3b228cab8a.tar.xz |
Merge pull request #3667 from matrix-org/erikj/fixup_unbind
Don't fail requests to unbind 3pids for non supporting ID servers
Diffstat (limited to 'synapse/rest/client/v1/admin.py')
-rw-r--r-- | synapse/rest/client/v1/admin.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/admin.py b/synapse/rest/client/v1/admin.py index 80d625eecc..ad536ab570 100644 --- a/synapse/rest/client/v1/admin.py +++ b/synapse/rest/client/v1/admin.py @@ -391,10 +391,17 @@ class DeactivateAccountRestServlet(ClientV1RestServlet): if not is_admin: raise AuthError(403, "You are not a server admin") - yield self._deactivate_account_handler.deactivate_account( + result = yield self._deactivate_account_handler.deactivate_account( target_user_id, erase, ) - defer.returnValue((200, {})) + if result: + id_server_unbind_result = "success" + else: + id_server_unbind_result = "no-support" + + defer.returnValue((200, { + "id_server_unbind_result": id_server_unbind_result, + })) class ShutdownRoomRestServlet(ClientV1RestServlet): |