Prevent exception when hs or shadow_hs missing (#5012)
* Prevent exception when hs or shadow_hs missingpull/5048/head dinsic_2019-04-04_2
parent
b00a8d870c
commit
dd747ba045
|
|
@ -49,8 +49,8 @@ def check_3pid_allowed(hs, medium, address):
|
|||
|
||||
# Check if this user is intended to register for this homeserver
|
||||
if (
|
||||
data['hs'] != hs.config.server_name
|
||||
and data['shadow_hs'] != hs.config.server_name
|
||||
data.get('hs') != hs.config.server_name
|
||||
and data.get('shadow_hs') != hs.config.server_name
|
||||
):
|
||||
defer.returnValue(False)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue