summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2023-02-09 21:26:21 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2023-02-09 21:29:59 +0000
commitb3f791ec3b7c321eabd34aeaa1d5dddc238f94ea (patch)
treebc7866ca8504c943d2a19ba486314f0f5404bb47 /synapse
parentAdd support for devenv developer environments (diff)
downloadsynapse-b3f791ec3b7c321eabd34aeaa1d5dddc238f94ea.tar.xz
Rename delete_threepid -> delete_and_unbind_threepid
To make it more obvious that this method will also
attempt to unbind threepids that are deleted through it.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/auth.py2
-rw-r--r--synapse/handlers/deactivate_account.py2
-rw-r--r--synapse/rest/admin/users.py2
-rw-r--r--synapse/rest/client/account.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index e6f9e5f878..8da017c3ba 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -1595,7 +1595,7 @@ class AuthHandler:
         # has successfully been created.
         await self._third_party_rules.on_threepid_bind(user_id, medium, address)
 
-    async def delete_threepid(
+    async def delete_and_unbind_threepid(
         self, user_id: str, medium: str, address: str, id_server: Optional[str] = None
     ) -> bool:
         """Attempts to unbind the 3pid on the identity servers and deletes it
diff --git a/synapse/handlers/deactivate_account.py b/synapse/handlers/deactivate_account.py
index aea0f8b7c2..a10b89ec30 100644
--- a/synapse/handlers/deactivate_account.py
+++ b/synapse/handlers/deactivate_account.py
@@ -105,7 +105,7 @@ class DeactivateAccountHandler:
         threepids = await self.store.user_get_threepids(user_id)
         for threepid in threepids:
             try:
-                result = await self._auth_handler.delete_threepid(
+                result = await self._auth_handler.delete_and_unbind_threepid(
                     user_id, threepid["medium"], threepid["address"], id_server
                 )
             except Exception:
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index b9dca8ef3a..9276a81d9f 100644
--- a/synapse/rest/admin/users.py
+++ b/synapse/rest/admin/users.py
@@ -304,7 +304,7 @@ class UserRestServletV2(RestServlet):
                 # remove old threepids
                 for medium, address in del_threepids:
                     try:
-                        await self.auth_handler.delete_threepid(
+                        await self.auth_handler.delete_and_unbind_threepid(
                             user_id, medium, address, None
                         )
                     except Exception:
diff --git a/synapse/rest/client/account.py b/synapse/rest/client/account.py
index 4373c73662..5b1e94c746 100644
--- a/synapse/rest/client/account.py
+++ b/synapse/rest/client/account.py
@@ -770,7 +770,7 @@ class ThreepidDeleteRestServlet(RestServlet):
         user_id = requester.user.to_string()
 
         try:
-            ret = await self.auth_handler.delete_threepid(
+            ret = await self.auth_handler.delete_and_unbind_threepid(
                 user_id, body.medium, body.address, body.id_server
             )
         except Exception: