Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
RenCurs committed Dec 24, 2024
1 parent 81ce0c4 commit cc638da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/util/phone.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ func FormatNumberForWA(number string) (string, error) {
}

// ParsePhone this function parses the number as a string
// For mexican numbers automatic add 1 after to the country code (521).
// But for argentine numbers there is no automatic addition 9 to the country code.
// For Mexican numbers `1` is always added to the national number because it is always removed during parsing.
// Attention when formatted in libphonenumber.INTERNATIONAL 1 will not be after the country code, even though
// it is in the national number.
// But for Argentine numbers there is no automatic addition 9 to the country code.
func ParsePhone(phoneNumber string) (*pn.PhoneNumber, error) {
trimmedPhone := TrimmedPhoneRegexp.ReplaceAllString(phoneNumber, "")
if len(trimmedPhone) < MinPhoneSymbolCount {
Expand Down

0 comments on commit cc638da

Please sign in to comment.