mirror of
https://github.com/NdoleStudio/httpsms.git
synced 2026-04-26 19:35:50 +03:00
[GH-ISSUE #321] message.phone.received loses numbers in contact field #44
Labels
No labels
In Review
documentation
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/httpsms#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @seanesbo on GitHub (Dec 12, 2023).
Original GitHub issue: https://github.com/NdoleStudio/httpsms/issues/321
I am from Colombia, the cell phone numbers we use are 10 digits.
In some cases it does not correctly register the cell phone number of the contact who sent the message.
As an example;
This is a correct notification:
{"specversion":"1.0","id":"e090dda8-e868-4485-92cc-60992c96f9d2","source":"/v1/messages/receive","type":"message.phone.received", "datacontenttype":"application/json","time":"2023-12-12T17:01:04.821071813Z","data":{"message_id":"92e21f8d-24c0-43d2-8b7b-80d83101ed5c","user_id ":"eKn7UVx9clQhcDdVoueZVRSfnlC2","owner":"+57322659XXXX","contact":"+333227XXXX","timestamp":"2023-12-12T17:01:03.845Z","content":"Miguel"," sim":"SIM1"}}
The contact field, 333227XXXX, has the correct length of 10 digits.
In other cases, inform the contact field in this way:
"contact":"+31373XXXX"
"contact":"+31445XXXX"
The real contact numbers are:
310373XXXX
310445XXXX
In short, the third number that is a 0 is losing it.
Note:Replace some numbers with X for safety
@AchoArnold commented on GitHub (Dec 13, 2023):
Hello @seanesbo,
I use this library to format the phone number https://github.com/google/libphonenumber
The application doesn't remove/overwrite phone numbers, If you see +31373XXXX it means this is the phone number that was received from your mobile phone when the SMS was received. There is no logic in the code to remove
0from a phone number.Thaks.