Skip to content
Snippets Groups Projects
Unverified Commit eeef9633 authored by Andrew Morgan's avatar Andrew Morgan Committed by GitHub
Browse files

Fix fallback value for account_threepid_delegates.email (#7316)

parent c58ae367
No related branches found
No related tags found
No related merge requests found
Fixed backwards compatibility logic of the first value of `trusted_third_party_id_servers` being used for `account_threepid_delegates.email`, which occurs when the former, deprecated option is set and the latter is not.
\ No newline at end of file
...@@ -108,9 +108,14 @@ class EmailConfig(Config): ...@@ -108,9 +108,14 @@ class EmailConfig(Config):
if self.trusted_third_party_id_servers: if self.trusted_third_party_id_servers:
# XXX: It's a little confusing that account_threepid_delegate_email is modified # XXX: It's a little confusing that account_threepid_delegate_email is modified
# both in RegistrationConfig and here. We should factor this bit out # both in RegistrationConfig and here. We should factor this bit out
self.account_threepid_delegate_email = self.trusted_third_party_id_servers[
0 first_trusted_identity_server = self.trusted_third_party_id_servers[0]
] # type: Optional[str]
# 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 self.using_identity_server_from_trusted_list = True
else: else:
raise ConfigError( raise ConfigError(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment