Prevent exception when hs or shadow_hs missing (#5012)

* Prevent exception when hs or shadow_hs missing
This commit is contained in:
Michael Kaye 2019-04-04 17:45:12 +01:00 committed by GitHub
parent b00a8d870c
commit dd747ba045
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,8 +49,8 @@ def check_3pid_allowed(hs, medium, address):
# Check if this user is intended to register for this homeserver # Check if this user is intended to register for this homeserver
if ( if (
data['hs'] != hs.config.server_name data.get('hs') != hs.config.server_name
and data['shadow_hs'] != hs.config.server_name and data.get('shadow_hs') != hs.config.server_name
): ):
defer.returnValue(False) defer.returnValue(False)