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

chronological order of messages in groups #32

Open
CopyCat73 opened this issue Nov 19, 2020 · 4 comments
Open

chronological order of messages in groups #32

CopyCat73 opened this issue Nov 19, 2020 · 4 comments

Comments

@CopyCat73
Copy link

On a new install of whatsapp on the iPhone, it creates all the groups before you can restore a backup. The only content in these group is a message "you were added" or "you created this group". If you then use watoi to append the data, this message is appended at the end and shown as most recent, e.g.:

message
message
message
2015: you created this group.

I think the order of appended messages needs to be fixed.

@residentsummer
Copy link
Owner

Does the message timestamp reflect real group creation time or activation time of the app on new device?

@CopyCat73
Copy link
Author

the real time of the creation. So I have newer messages and then it says "you created this group" with a date of years ago as the most recent message.

@residentsummer
Copy link
Owner

Whatsapp does not rely on timestamps, stored in messages, but uses a sort field instead. The issue is that I've assumed that all messages, already present in ChatStorage.sqlite (1) , are more recent that ones from the android db (2), which is still valid for normal messages. So I did a simple reordering to put (2) behind (1). Reordering is required, by the way. We have two options here to mitigate the issue with "chat created" type of messages:

  • Reorder all messages not based on sort field, but on timestamp
  • Ignore system messages when fixing sort field of (1)

I consider this issue to be a minor inconvenience, though. Accepting PRs. :)

@CopyCat73
Copy link
Author

I'll start looking into it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants