Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Update m.id.phone to use 'phone' instead of 'number'
Browse files Browse the repository at this point in the history
Fixes bug introduced in #1994
  • Loading branch information
anoadragon453 committed Jun 12, 2020
1 parent a3fbc23 commit 65ca5a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/rest/client/v1/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ def login_id_thirdparty_from_phone(identifier):
Returns: Login identifier dict of type 'm.id.threepid'
"""
if "country" not in identifier or "number" not in identifier:
if "country" not in identifier or "phone" not in identifier:
raise SynapseError(400, "Invalid phone-type identifier")

msisdn = phone_number_to_msisdn(identifier["country"], identifier["number"])
msisdn = phone_number_to_msisdn(identifier["country"], identifier["phone"])

return {"type": "m.id.thirdparty", "medium": "msisdn", "address": msisdn}

Expand Down

0 comments on commit 65ca5a7

Please sign in to comment.