diff options
author | Matrix <matrix@i.tchap.gouv.fr> | 2018-05-03 23:54:20 +0000 |
---|---|---|
committer | Matrix <matrix@i.tchap.gouv.fr> | 2018-05-03 23:54:36 +0000 |
commit | 907a62df286eb013eb6475b1c47f285a7e5750e1 (patch) | |
tree | 6889f95d65ffc8f70bd256ae6c10458603c1f742 /synapse/rest/client | |
parent | unbreak 3pid deletion (diff) | |
download | synapse-907a62df286eb013eb6475b1c47f285a7e5750e1.tar.xz |
fix strip_invalid_mxid_characters
Diffstat (limited to 'synapse/rest/client')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index b5704a39d9..36676c9fa8 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -387,7 +387,7 @@ class RegisterRestServlet(RestServlet): self.hs.config.register_mxid_from_3pid == 'email' and LoginType.EMAIL_IDENTITY in auth_result ): - address = auth_result[login_type]['address'] + address = auth_result[LoginType.EMAIL_IDENTITY]['address'] desired_username = types.strip_invalid_mxid_characters( address.replace('@', '-').lower() ) @@ -427,7 +427,7 @@ class RegisterRestServlet(RestServlet): self.hs.config.register_mxid_from_3pid == 'msisdn' and LoginType.MSISDN in auth_result ): - desired_username = auth_result[login_type]['address'] + desired_username = auth_result[LoginType.MSISDN]['address'] else: raise SynapseError( 400, "Cannot derive mxid from 3pid; no recognised 3pid" |