Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GetLengthOfGeographicalAreaCode to match recent libphonenumber changes #176

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

rowanseymour
Copy link
Member

Addresses #173

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 46.81%. Comparing base (2aea864) to head (bf96e96).

Files Patch % Lines
phonenumbers.go 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   46.75%   46.81%   +0.06%     
==========================================
  Files          11       11              
  Lines        3788     3798      +10     
==========================================
+ Hits         1771     1778       +7     
- Misses       1867     1869       +2     
- Partials      150      151       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rowanseymour rowanseymour merged commit 7c6fa25 into main Jul 15, 2024
10 checks passed
@rowanseymour rowanseymour deleted the mx_update branch July 15, 2024 15:20
@alicebob
Copy link

alicebob commented Jul 23, 2024

Hi,

are you sure this is correct? Before this update +5214424123123 rendered as +524424123123 (the first "1" is gone). "+524424123123" also renders to that version (so it stays the same). The "521" prefix is an old one which is not in use anymore.

Random reference from the Interwebs:

https://www.jaxcom.net/blog/important-changes-to-mexico-521-dialing-pattern/
All calls to Mexico mobile phones:
Will no longer need the prefix of ‘521’ followed by the phone number.
Must strictly be dialed as ’52’ followed by the phone number.

edit: actually was probably changed in #175

@rowanseymour
Copy link
Member Author

Hi @alicebob if you think there's a parsing problem please confirm the problem doesn't also exist in https://github.com/googlei18n/libphonenumber

@alicebob
Copy link

alicebob commented Jul 23, 2024

Even worse, that one rejects it with the 1:

https://libphonenumber.appspot.com/phonenumberparser?number=%2B524424123123
E164 format: +524424123123

https://libphonenumber.appspot.com/phonenumberparser?number=%2B5214424123123
E164 format: invalid

(This version of nyaruka accepts the one, and an older one dropped it)

@rowanseymour
Copy link
Member Author

Please report that then as an issue on that library as we are just a port of that and use their metadata

@alicebob
Copy link

alicebob commented Jul 23, 2024 via email

@rowanseymour
Copy link
Member Author

I agree but we are using their metadata, so it needs to be fixed there first

@alicebob
Copy link

thanks @rowanseymour . I made a separate issue, instead of talking in a closed PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants