Similar phone numbers are merged together

REPRODUCIBILITY (% or how often): 100% (happened the 2 times I did a mistake in a phone number)
BUILD ID: 3.1.0.11
HARDWARE (Jolla1, Tablet, XA2,…): Jolla1
UI LANGUAGE: English
REGRESSION: (compared to previous public release: Yes, No, ?): I don’t know

DESCRIPTION:

By mistake, with my French phone number I sent an SMS to another French phone number starting with the country calling code +33 followed by 6 instead of 7 (only the first digit was wrong). When I wanted to send another SMS to the correct number, I noticed that it was still sent to the wrong number. Similar phone numbers seem to be merged together and the first phone number used will be selected. The workaround to fix the issue was to delete the conversation and start a new one to the correct phone number.
I noticed the issue also happened when sending by mistake an SMS to a phone number with the wrong country calling code, for example Germany +49 instead of UK +44 (only the country calling code was wrong).

PRECONDITIONS:

I tested with Sailfish OS 3.1.0.11 but the issue may happen with newer versions also. If the issue is already fixed in the last version, this bug report can still be useful as an archive to past bugs (I did not find this one when searching).
Note: the phone numbers are not saved as contacts.

STEPS TO REPRODUCE:

  1. Send an SMS to a phone number with a wrong first digit or a wrong country calling code
  2. Send an SMS to the correct phone number

EXPECTED RESULT:

The SMS should be sent to the correct phone number.

ACTUAL RESULT:

The SMS is sent to the wrong phone number.

ADDITIONAL INFORMATION:

(Please ALWAYS attach relevant data such as logs, screenshots, etc…)

1 Like

Could you please update to the latest available OS version and check if this is still the case? I believe this bug has already been fixed with 3.3.0.

Unfortunately I cannot confirm as still on 3.2.1.20 ( and having this issue still ).

But I agree to jiit and also believe this was fixed, at least it was under discussion and tracked.
So maybe someone else on 3.3 can confirm by creating a dummy entry in contacts with same number but the first digit after CC?
Like
+491234567890
+492234567890

I will try the latest version when I have a moment. For information, the bug happened to me when the phone number was not saved as contact so it is possible that you cannot reproduce the bug if it is saved as contact.

Just creating 2 dummy contacts with a different first digit like +33612345678 and +33712345678 did not show the issue since 2 different contacts were created with 2 different conversations when sending messages. However when deleting the 2 contacts, I can see that the conversations are grouped together.

1 Like

I (re-)discovered this issue recently. In the call history, for unsaved numbers, matching is done on the last 8 digits only, see this discussion [voicecall] Create a plugin logging calls to CommHistory. by dcaliste · Pull Request #18 · sailfishos/voicecall · GitHub For reference, this is this line from qtcontacts-sqlite that defines the suffix length for unsaved phone matching.

It’s a sensitive area, changing this variable to something larger may work for French numbers but may break for some other countries or usage of this constant.

The real fix would be in libcommhistory, where it is used to match unsaved phone numbers, to rewrite the matching function and use libphonenumber for instance that can take care of the international prefix to know the real suffix or phone number.

2 Likes

The problem was summarised well!

1 Like