[GH-ISSUE #621] Restore creates 2 conversations for one contact #531

Open
opened 2026-02-26 01:30:53 +03:00 by kerem · 6 comments
Owner

Originally created by @leguillou on GitHub (Feb 4, 2016).
Original GitHub issue: https://github.com/jberkel/sms-backup-plus/issues/621

When restoring, some contacts get 2 conversations on my phone. One for sent messages and one for received ones. I checked these contacts informations and conversations threads in Gmail compared to the ones with no problem but I can't see any difference.
Thanks in advance for your help.

Originally created by @leguillou on GitHub (Feb 4, 2016). Original GitHub issue: https://github.com/jberkel/sms-backup-plus/issues/621 When restoring, some contacts get 2 conversations on my phone. One for sent messages and one for received ones. I checked these contacts informations and conversations threads in Gmail compared to the ones with no problem but I can't see any difference. Thanks in advance for your help.
Author
Owner

@leguillou commented on GitHub (Feb 4, 2016):

Update. When I do "show original" on the emails, it shows that when I send the sms, it's written without the country code and when I receive it, it has the country code. Consequently, it shows two threads.

The strange thing it does that even for contact written with the country code in my contact list.

<!-- gh-comment-id:179839330 --> @leguillou commented on GitHub (Feb 4, 2016): Update. When I do "show original" on the emails, it shows that when I send the sms, it's written without the country code and when I receive it, it has the country code. Consequently, it shows two threads. The strange thing it does that even for contact written with the country code in my contact list.
Author
Owner

@jberkel commented on GitHub (Feb 4, 2016):

Can you post some examples? Maybe just the headers, can be obfuscated.

<!-- gh-comment-id:179922245 --> @jberkel commented on GitHub (Feb 4, 2016): Can you post some examples? Maybe just the headers, can be obfuscated.
Author
Owner

@iainnicol commented on GitHub (Feb 4, 2016):

I'm experiencing this too. (Although it's not entirely sent vs. received.)

I agree that the two threads have different phone numbers.

One conversation has this header
X-smssync-address: 07123456789
and the other has
X-smssync-address: +447123456789

<!-- gh-comment-id:180065376 --> @iainnicol commented on GitHub (Feb 4, 2016): I'm experiencing this too. (Although it's not entirely sent vs. received.) I agree that the two threads have different phone numbers. One conversation has this header `X-smssync-address: 07123456789` and the other has `X-smssync-address: +447123456789`
Author
Owner

@jberkel commented on GitHub (Feb 5, 2016):

@iainnicol How is the number stored in your contacts? a quick workaround would be to store both numbers in your contacts.

<!-- gh-comment-id:180331898 --> @jberkel commented on GitHub (Feb 5, 2016): @iainnicol How is the number stored in your contacts? a quick workaround would be to store both numbers in your contacts.
Author
Owner

@iainnicol commented on GitHub (Feb 7, 2016):

@jberkel, that's a good suggestion, but surprisingly didn't help. I've tried all combinations in the contact:

  • +44 7
  • 07
  • both

For my own purposes I'll just locally hack the code to normalise the number on restore.

But I wonder if we could attempt to force use of the country code format during backup?

<!-- gh-comment-id:180996450 --> @iainnicol commented on GitHub (Feb 7, 2016): @jberkel, that's a good suggestion, but surprisingly didn't help. I've tried all combinations in the contact: - +44 7 - 07 - both For my own purposes I'll just locally hack the code to normalise the number on restore. But I wonder if we could attempt to force use of the country code format during backup?
Author
Owner

@jberkel commented on GitHub (Feb 7, 2016):

Yes, I guess it's a matter of checking the different variants and making sure enough information is stored in the backup so that all conversations can be tied together. The address used is currently directly taken from Android, without any modification or additional lookups. Not sure why the country code is sometimes not in there. See MessageGenerator.java#L75-L75.

It is then used to generate an email message id HeaderGenerator.java#L102-L102 which is used by gmail for threading. So the normalization would need to take that into account.

<!-- gh-comment-id:181018356 --> @jberkel commented on GitHub (Feb 7, 2016): Yes, I guess it's a matter of checking the different variants and making sure enough information is stored in the backup so that all conversations can be tied together. The address used is currently directly taken from Android, without any modification or additional lookups. Not sure why the country code is sometimes not in there. See [MessageGenerator.java#L75-L75](https://github.com/jberkel/sms-backup-plus/blob/edb5f412deb096acce079fcb2d2fdc8137e073d7/src/main/java/com/zegoggles/smssync/mail/MessageGenerator.java#L75-L75). It is then used to generate an email message id [HeaderGenerator.java#L102-L102](https://github.com/jberkel/sms-backup-plus/blob/edb5f412deb096acce079fcb2d2fdc8137e073d7/src/main/java/com/zegoggles/smssync/mail/HeaderGenerator.java#L102-L102) which is used by gmail for threading. So the normalization would need to take that into account.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sms-backup-plus-jberkel#531
No description provided.