ocsms
ocsms copied to clipboard
Contacts not matching numbers
Steps to reproduce
- Have a contact with a phone number formatted like: "1234567890"
- Sync SMS
- Contact does not match message chain because it synced as "123-456-7890"
Expected behaviour
Contacts should fuzzy match message chains. Small differences in formatting like "1234567890" and "123-456-7890" or "+11234567890" (country code) act as if they are entirely different numbers.
Actual behaviour
Contacts do not match when the number has small differences in formatting. The conversation just appears listed under the number.
Server configuration
NextCloud/ownCloud version: 11.0.2
PHP version: 7.0.14
HTTPd server: Apache
HTTPS: Yes (LetsEncrypt)
Client configuration
Android version: 7.1.1
Phone: Nexus 6P
ownCloud SMS app version: 0.24.1 (F-Droid)
Logs
N/A
We have some problems with the contact deduplication sometimes...
Hi,
Any update regarding to this problem?
I have some contacts with phone number formatted like "+1234567890" and they are synched as "1234567890" and "+1 234 567 890" or "+1 (234) 567 890". The idea is that one single contact is synched as 2 different sms_address.
On the UI, the sms_address "+1 (234) 567 890" appears as "+1(234)567890" (Note the missing spaces) and when I select it, it says that "0 message(s) shown. 0 message(s) stored in database."
Thanks, kukukk
I too have this problem. It is particularly problematic when the phone number is different between sent and received messages, and then there are separate tabs for each side of a conversation.
[Edit my country code was set wrong, apparently it defaulted to Afghanistan. More contacts link up properly, but I'm still getting split conversations though]
@bruceg it's not simple intl phone number are sometimes different from local country number + prefix...
I was looking at the code and decided to spend some time to see if I could improve the phone number formatting. Long and short of it is that the current regex based method seems pretty hard to fix.
So I did some searching and found libphonenumber which is a port of Google's phone parsing library to PHP and it seems to handle things quite a bit better (at least for NANP numbers, it will need some testing for the rest of the world of course :wink:).
I've forked the code and will open a PR with my changes.
Any info when your pull request will be merged and released?
should be fixed by recent release
Still has problem with phone numbers formatting in phone sync I see sms in form +7XXXXXX-XX-XX and in contacts same number formatted like +7XXXXXXXXXX
Phone Sync 2.1.1
Same issue here. Received sms are seen as +33 which makes them being in a differenct contact
random passerby : is this still an issue? did someone forget to close this issue after it was fixed in https://github.com/nextcloud/ocsms/releases/tag/1.13.0 as mentioned in https://github.com/nextcloud/ocsms/issues/176#issuecomment-400429053?
Also #121 looks like a duplicate of this issue as well. If they are already fixed, can someone close both these issues?
Number matching was significantly improved though PR #241 but there are still corner cases that exist, hence why this was left open (to my recollection at least).