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

Messages order #247

Closed
mlomb opened this issue Feb 1, 2023 · 1 comment
Closed

Messages order #247

mlomb opened this issue Feb 1, 2023 · 1 comment

Comments

@mlomb
Copy link

mlomb commented Feb 1, 2023

Sometimes messages are not chronologically ordered, for example WhatsApp may export this (due connection issues I think):

12/21/20, 23:50 - A: blah
12/21/20, 23:49 - B: blah
12/21/20, 23:50 - B: blah

This leads whatsapp-chat-parser to generate the messages array in the same order.

This may be by design, one may want to preserve the exact order messages were found in the text file.
I am working in a project that assumes messages come in chronological order and found out some WhatsApp exports were breaking because of this. I can just sort the messages after the parseString call and everything works fine on my side, I just wanted to let you know that it can happen and you may want to add a warning somewhere or add a sort at the end.


While we are at it, I wanted to thank you for making and maintaining whatsapp-chat-parse, I use it in chat-analytics and WhatsApp is by far the most complicated platform to deal with.

@Pustur
Copy link
Owner

Pustur commented Feb 1, 2023

Hey @mlomb,
thanks for opening the issue.

I noticed it too, sometimes due to bad connection the messages get out of order.

I think my library shouldn't make the assumption that the consumer wants the messages sorted, so I think it's better to leave that task to the end user if they want to sort the messages a certain way.
But I agree it should be explained somewhere in the readme. I'll make a note of it.

I already saw your tool through the Network Dependents page once. It looks great! And yes Whatsapp really is the worst. No date standards, multiple languages for system messages, output is different between different iPhone or Android... It's a mess 😅

@Pustur Pustur closed this as completed in 2ffba97 Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants