summary refs log tree commit diff
path: root/synapse/handlers/deactivate_account.py
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2019-09-23 17:50:27 +0200
committerRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-09-23 16:50:27 +0100
commit30af161af27146cc44152292060c7005a6b8546b (patch)
tree76608bb5095b44d88d87b29bb01c210016100fa8 /synapse/handlers/deactivate_account.py
parentDisable /register/available if registration is disabled (#6082) (diff)
downloadsynapse-30af161af27146cc44152292060c7005a6b8546b.tar.xz
Implement MSC2290 (#6043)
Implements MSC2290. This PR adds two new endpoints, /unstable/account/3pid/add and /unstable/account/3pid/bind. Depending on the progress of that MSC the unstable prefix may go away.

This PR also removes the blacklist on some 3PID tests which occurs in #6042, as the corresponding Sytest PR changes them to use the new endpoints.

Finally, it also modifies the account deactivation code such that it doesn't just try to deactivate 3PIDs that were bound to the user's account, but any 3PIDs that were bound through the homeserver on that user's account.
Diffstat (limited to 'synapse/handlers/deactivate_account.py')
-rw-r--r--synapse/handlers/deactivate_account.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index 5f804d1f13..d83912c9a4 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -73,7 +73,9 @@ class DeactivateAccountHandler(BaseHandler):
         # unbinding
         identity_server_supports_unbinding = True
 
-        threepids = yield self.store.user_get_threepids(user_id)
+        # Retrieve the 3PIDs this user has bound to an identity server
+        threepids = yield self.store.user_get_bound_threepids(user_id)
+
         for threepid in threepids:
             try:
                 result = yield self._identity_handler.try_unbind_threepid(