summary refs log tree commit diff
path: root/synapse/handlers/identity.py
diff options
context:
space:
mode:
authorMathieu Velten <matmaul@gmail.com>2021-08-18 11:58:44 +0200
committerMathieu Velten <matmaul@gmail.com>2021-08-30 16:14:35 +0200
commitbf461ad7b4afa4dbaff97879ce10350497212630 (patch)
treecd859343410f18e8c04771786ed04ae3cf0cda77 /synapse/handlers/identity.py
parentIncorporate fixes from https://github.com/matrix-org/synapse-freeze-room (diff)
downloadsynapse-bf461ad7b4afa4dbaff97879ce10350497212630.tar.xz
Fix deactivation
Diffstat (limited to 'synapse/handlers/identity.py')
-rw-r--r--synapse/handlers/identity.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py
index 6da207caf0..f4c1265b43 100644
--- a/synapse/handlers/identity.py
+++ b/synapse/handlers/identity.py
@@ -251,8 +251,6 @@ class IdentityHandler(BaseHandler):
         """
         if threepid.get("id_server"):
             id_servers = [threepid["id_server"]]
-        elif self.hs.config.bind_new_user_emails_to_sydent:
-            id_servers = [self.hs.config.bind_new_user_emails_to_sydent]
         else:
             id_servers = await self.store.get_id_servers_user_bound(
                 user_id=mxid, medium=threepid["medium"], address=threepid["address"]
@@ -312,6 +310,9 @@ class IdentityHandler(BaseHandler):
         # the server we connect to.
         id_server_url = self.rewrite_id_server_url(id_server, add_https=True)
 
+        if self.hs.config.bind_new_user_emails_to_sydent:
+            id_server_url = self.hs.config.bind_new_user_emails_to_sydent
+
         url = "%s/_matrix/identity/api/v1/3pid/unbind" % (id_server_url,)
 
         try: