mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
handle medium checks correctly
This commit is contained in:
parent
969ed2e49d
commit
240e940c3f
@ -377,9 +377,18 @@ class RegisterRestServlet(RestServlet):
|
|||||||
# we should always have an auth_result if we're going to progress
|
# we should always have an auth_result if we're going to progress
|
||||||
# to register the user (i.e. we haven't picked up a registered_user_id)
|
# to register the user (i.e. we haven't picked up a registered_user_id)
|
||||||
# from our session store
|
# from our session store
|
||||||
if auth_result and self.hs.config.register_mxid_from_3pid in auth_result:
|
if auth_result:
|
||||||
|
if (
|
||||||
|
(
|
||||||
|
self.hs.config.register_mxid_from_3pid == 'email' and
|
||||||
|
LoginType.EMAIL_IDENTITY in auth_result
|
||||||
|
) or (
|
||||||
|
self.hs.config.register_mxid_from_3pid == 'msisdn' and
|
||||||
|
LoginType.MSISDN in auth_result
|
||||||
|
)
|
||||||
|
):
|
||||||
address = auth_result[login_type]['address']
|
address = auth_result[login_type]['address']
|
||||||
desired_username = address.lower()
|
desired_username = address.replace('@', '.').lower()
|
||||||
|
|
||||||
if desired_username is not None:
|
if desired_username is not None:
|
||||||
yield self.registration_handler.check_username(
|
yield self.registration_handler.check_username(
|
||||||
|
Loading…
Reference in New Issue
Block a user