summary refs log tree commit diff
path: root/synapse/rest/admin/users.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2023-02-10 17:26:04 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2023-02-10 17:26:04 +0000
commit29fb6ead27bdf782fd736af7eca25320ccc92aa9 (patch)
tree6a86c85eee5e23a2827561e6bba12b87bf9ae3b1 /synapse/rest/admin/users.py
parentRename delete_threepid -> delete_and_unbind_threepid (diff)
downloadsynapse-github/anoa/blablabla.tar.xz
Diffstat (limited to 'synapse/rest/admin/users.py')
-rw-r--r--synapse/rest/admin/users.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index 9276a81d9f..9e33012ae3 100644
--- a/synapse/rest/admin/users.py
+++ b/synapse/rest/admin/users.py
@@ -304,8 +304,13 @@ class UserRestServletV2(RestServlet):
                 # remove old threepids
                 for medium, address in del_threepids:
                     try:
-                        await self.auth_handler.delete_and_unbind_threepid(
-                            user_id, medium, address, None
+                        await self.hs.get_identity_handler().try_unbind_threepid(
+                            user_id,
+                            {"medium": medium, "address": address, "id_server": None},
+                        )
+
+                        await self.auth_handler.delete_local_threepid(
+                            user_id, medium, address
                         )
                     except Exception:
                         logger.exception("Failed to remove threepids")