diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-10-04 07:18:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 07:18:54 -0400 |
commit | a0f48ee89d88fd7b6da8023dbba607a69073152e (patch) | |
tree | 107479097f59b480c0e1c6051db22fd9bd89b2ef /synapse/handlers/identity.py | |
parent | Merge remote-tracking branch 'origin/release-v1.44' into develop (diff) | |
download | synapse-a0f48ee89d88fd7b6da8023dbba607a69073152e.tar.xz |
Use direct references for configuration variables (part 7). (#10959)
Diffstat (limited to 'synapse/handlers/identity.py')
-rw-r--r-- | synapse/handlers/identity.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py index a0640fcac0..c881475c25 100644 --- a/synapse/handlers/identity.py +++ b/synapse/handlers/identity.py @@ -573,9 +573,15 @@ class IdentityHandler(BaseHandler): # Try to validate as email if self.hs.config.email.threepid_behaviour_email == ThreepidBehaviour.REMOTE: + # Remote emails will only be used if a valid identity server is provided. + assert ( + self.hs.config.registration.account_threepid_delegate_email is not None + ) + # Ask our delegated email identity server validation_session = await self.threepid_from_creds( - self.hs.config.account_threepid_delegate_email, threepid_creds + self.hs.config.registration.account_threepid_delegate_email, + threepid_creds, ) elif self.hs.config.email.threepid_behaviour_email == ThreepidBehaviour.LOCAL: # Get a validated session matching these details @@ -587,10 +593,11 @@ class IdentityHandler(BaseHandler): return validation_session # Try to validate as msisdn - if self.hs.config.account_threepid_delegate_msisdn: + if self.hs.config.registration.account_threepid_delegate_msisdn: # Ask our delegated msisdn identity server validation_session = await self.threepid_from_creds( - self.hs.config.account_threepid_delegate_msisdn, threepid_creds + self.hs.config.registration.account_threepid_delegate_msisdn, + threepid_creds, ) return validation_session |