summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2020-04-29 11:30:06 +0100
committerGitHub <noreply@github.com>2020-04-29 11:30:06 +0100
commiteeef9633af74d1282c1d1b80bfb117c34f43482b (patch)
tree4d4ecb1a089f5dee573ba986319517fae156d349 /synapse
parentClean up admin api docs (#7361) (diff)
downloadsynapse-eeef9633af74d1282c1d1b80bfb117c34f43482b.tar.xz
Fix fallback value for account_threepid_delegates.email (#7316)
Diffstat (limited to 'synapse')
-rw-r--r--synapse/config/emailconfig.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py
index f31fc85ec8..76b8957ea5 100644
--- a/synapse/config/emailconfig.py
+++ b/synapse/config/emailconfig.py
@@ -108,9 +108,14 @@ class EmailConfig(Config):
             if self.trusted_third_party_id_servers:
                 # XXX: It's a little confusing that account_threepid_delegate_email is modified
                 # both in RegistrationConfig and here. We should factor this bit out
-                self.account_threepid_delegate_email = self.trusted_third_party_id_servers[
-                    0
-                ]  # type: Optional[str]
+
+                first_trusted_identity_server = self.trusted_third_party_id_servers[0]
+
+                # trusted_third_party_id_servers does not contain a scheme whereas
+                # account_threepid_delegate_email is expected to. Presume https
+                self.account_threepid_delegate_email = (
+                    "https://" + first_trusted_identity_server
+                )  # type: Optional[str]
                 self.using_identity_server_from_trusted_list = True
             else:
                 raise ConfigError(