Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support group chats #159

Open
przemoc opened this issue Feb 9, 2024 · 8 comments
Open

Support group chats #159

przemoc opened this issue Feb 9, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@przemoc
Copy link

przemoc commented Feb 9, 2024

I use Google Messages with following configuration
Settings > Advanced > Group Messaging > Send an SMS reply to all recipients and get individual replies (mass text)

Such group chat (and corresponding individual messages) look like this in messages.ndjson exported in v2.3.1:

{"_id":"11038","thread_id":"155","address":"+48aaaaaaaaa +48bbbbbbbbb +48ccccccccc ddddddddd","date":"1695928662181","date_sent":"0","read":"1","status":"0","type":"2","body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostru","locked":"0","error_code":"0","seen":"1","timed":"0","deleted":"0","sync_state":"0","marker":"0","bind_id":"0","mx_status":"0","out_time":"0","sim_id":"1","block_type":"0","advanced_seen":"3","b2c_ttl":"0","fake_cell_type":"0","url_risky_type":"0","favorite_date":"0","sub_id":"1","__display_name":"Person d"}
{"_id":"11041","thread_id":"3","address":"+48ccccccccc","date":"1695928662180","date_sent":"1695928665179","read":"1","status":"0","type":"2","body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostru","locked":"0","error_code":"0","seen":"1","timed":"0","deleted":"0","sync_state":"0","marker":"0","bind_id":"0","mx_status":"0","out_time":"0","sim_id":"1","block_type":"0","advanced_seen":"3","b2c_ttl":"0","fake_cell_type":"0","url_risky_type":"0","favorite_date":"0","sub_id":"1","__display_name":"Person c"}
{"_id":"11040","thread_id":"11","address":"+48bbbbbbbbb","date":"1695928662180","date_sent":"1695928667041","read":"1","status":"0","type":"2","body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostru","locked":"0","error_code":"0","seen":"1","timed":"0","deleted":"0","sync_state":"0","marker":"0","bind_id":"0","mx_status":"0","out_time":"0","sim_id":"1","block_type":"0","advanced_seen":"3","b2c_ttl":"0","fake_cell_type":"0","url_risky_type":"0","favorite_date":"0","sub_id":"1","__display_name":"Person b"}
{"_id":"11039","thread_id":"22","address":"+48aaaaaaaaa","date":"1695928662180","date_sent":"1695928665843","read":"1","status":"0","type":"2","body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostru","locked":"0","error_code":"0","seen":"1","timed":"0","deleted":"0","sync_state":"0","marker":"0","bind_id":"0","mx_status":"0","out_time":"0","sim_id":"1","block_type":"0","advanced_seen":"3","b2c_ttl":"0","fake_cell_type":"0","url_risky_type":"0","favorite_date":"0","sub_id":"1","__display_name":"Person a"}
{"_id":"11042","thread_id":"41","address":"ddddddddd","date":"1695928662180","date_sent":"1695928665985","read":"1","status":"0","type":"2","body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostru","locked":"0","error_code":"0","seen":"1","timed":"0","deleted":"0","sync_state":"0","marker":"0","bind_id":"0","mx_status":"0","out_time":"0","sim_id":"1","block_type":"0","advanced_seen":"3","b2c_ttl":"0","fake_cell_type":"0","url_risky_type":"0","favorite_date":"0","sub_id":"1","__display_name":"Person d"}

When imported, group chat doesn't look like a group chat, but like an individual chat with person whose name is concatenation of those phone numbers:

+48aaaaaaaaa+48bbbbbbbbb+48cccccccccddddddddd

(EDIT: To clarify, respective individual chats contain the message, as it is apparently stored for each of them individually too, so no issues with individual chats.)

I suspect that group chat may require some special handling on import, export or maybe in both cases.


Background:

Thanks for creating this application! I'm fan of SMS Backup+, but it doesn't handle MMSes properly, so when switching phones and restoring them, I were always losing them in respective conversation threads (at least they were still stored in mail most of the time, so it was somewhat acceptable). I hoped to avoid losing anything on target phone this time, so I gave your app a try.

I've used the latest SMS Import / Export, which is at v2.3.1 right now. First I exported messages from Android 11 phone (w/ Google Messages version messages.android_20240123_01_RC02.phone_dynamic). Then I imported messages to Android 14 phone (w/ Google Messages version messages.android_20240116_01_RC04.phone_dynamic). I'm mentioning Android (and Messages) versions just in case, not sure if they are relevant here at all. At first I thought it didn't work at all, because after finishing import, Messages didn't show anything, but after stopping the app, clearing its storage and running Messages again, messages were finally available! I've started scrolling to the bottom, and it seemed that chats from few years back were not showing, Messages displayed some placeholder at the bottom and some loading animations were happening. It felt like it got stuck, but eventually after several seconds, or maybe even a minute, more messages loaded, then I scrolled more and situation repeated a few times, until I reached to the very first message that was stored on the old phone. Hard to tell if everything imported properly (due to sheer volume, many thousands of messages spanning over 10 years), but quickly glancing at stuff looked like things looked good, and MMSes were in converation threads. But I noticed one problem.

@tmo1
Copy link
Owner

tmo1 commented Feb 16, 2024

Thanks for the report; I'm looking into it.

@tmo1
Copy link
Owner

tmo1 commented Feb 22, 2024

When imported, group chat doesn't look like a group chat, but like an individual chat with person whose name is concatenation of those phone numbers:

I have confirmed that the app does not handle SMS message with multiple recipients correctly.

I suspect that group chat may require some special handling on import, export or maybe in both cases.

It looks like it. Unfortunately, I have not yet been able to figure out how to do so.

after finishing import, Messages didn't show anything, but after stopping the app, clearing its storage and running Messages again, messages were finally available! I've started scrolling to the bottom, and it seemed that chats from few years back were not showing, Messages displayed some placeholder at the bottom and some loading animations were happening. It felt like it got stuck, but eventually after several seconds, or maybe even a minute, more messages loaded, then I scrolled more and situation repeated a few times, until I reached to the very first message that was stored on the old phone.

This is documented in the README.

@tmo1 tmo1 self-assigned this Feb 22, 2024
@tmo1 tmo1 added the bug Something isn't working label Feb 22, 2024
@przemoc
Copy link
Author

przemoc commented Feb 23, 2024

I have confirmed that the app does not handle SMS message with multiple recipients correctly.

It looks like it. Unfortunately, I have not yet been able to figure out how to do so.

Thank you for looking into that.

Would it be possible to add support for ignoring those group chats on import?
(I mean only group ones, individual ones should not be skipped, because same messages can be found in them too.)

This is documented in the README.

The behavior with Google Messages taking very long time to load older messages was not described. I was on the verge of thinking that something was broken after import. So decided to describe my experience, so that others trying to google it would be able to find it.

@tmo1
Copy link
Owner

tmo1 commented Feb 25, 2024

Would it be possible to add support for ignoring those group chats on import?
(I mean only group ones, individual ones should not be skipped, because same messages can be found in them too.)

Can you explain more clearly what you mean by this?

@przemoc
Copy link
Author

przemoc commented Feb 25, 2024

As I have shown in my first message in the issue, messages send through group chat (e.g. to +48aaaaaaaaa & +48bbbbbbbbb) appear also in individual chats (separately w/ +48aaaaaaaaa, and separately w/ +48bbbbbbbbb) when exported. Preserving group chats would be preferable for seamless transition between phones, but even if they're not imported, messages are not lost and still accessible (which is the most important feature of any backup & restore solution), and if one would like to send message to the same group chat that was previously created on other device, in the worst case it can be recreated manually for new messages.

So what I'm suggesting is having an option for import to ignore/skip group chats, i.e. entries with multiple numbers in address.
(And only for import, because export seems ok-ish as far as I can tell, so it's good to have group chats exported even if it cannot be imported properly atm.)
Having broken group chats and having to remove them manually is somewhat inconvenient.

When a way to properly import group chats will be found, then such option could be no longer needed (or it could be left there, maybe some folks would prefer it, or there could be even a counterpart option to simply import only group chats for those that had to skip it before).

Does it sound reasonable?

tmo1 added a commit that referenced this issue Mar 1, 2024
@tmo1
Copy link
Owner

tmo1 commented Mar 1, 2024

It turns out that in my original testing of multiple recipient SMS messages, I was making a mistake and not creating them properly, and that's why I was not seeing what you were seeing. Now that I'm doing it correctly, I'm seeing results similar to yours, with the difference that for your sample message, I see what you describe, whereas with messages that I created, the message with the recipients concatenated is placed in the same thread as the message to the final recipien. I.e., a message to num1, num2, and num3 exports as four messages, as per your example, but upon import, I get three conversations containing four messages, with the message to "num1 num2 num3" combined in the same conversation as the one to num3. (I think the combination was always with the final recipient, although I'm not totally sure.)

In any event, after much experimenting and searching, I have still been unable to figure out how to properly import such messages, so I've followed your suggestion and modified the app to skip them. I'm leaving this issue open in the hope that we'll eventually figure out the correct way to handle such messages.

@przemoc
Copy link
Author

przemoc commented Mar 22, 2024

Thank you for the effort. I will try to do new export + import in upcoming days and test if skipping works as expected.

@przemoc
Copy link
Author

przemoc commented Mar 24, 2024

I tested v2.3.2 today. Group chats have been skipped during import, so there are no entries with broken recipient (seen as concatenated numbers previously). That's a good workaround until proper solution will be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants