B16f00t / whapa

WhatsApp Parser Toolset v1.59
1.1k stars 258 forks source link

Merge doesn't work on latest WhatsApp #157

Closed YuvrajRaghuvanshiS closed 2 years ago

YuvrajRaghuvanshiS commented 2 years ago

Hi, thank you for the project.

I tried merging two databases today (both pulled from same version of WhatsApp) but I see in the merge script that a lot of attributes are missing from messages relation for instance "future_message_type". There are other relations/table references also in the script which I could not understand.

The issue I am facing is that this does not work on latest db (from crypt14). Is there any plans on upgrading that?

natario1 commented 2 years ago

I'm also blocked on this. I could get away with wrongly named columns, which I renamed by looking at the available one with a similar name (for example, many ...table_id are now ...row_id). But then I hit the biggest problem - chat_view is a SQL view so you can't insert into it.

It's defined as

CREATE VIEW chat_view AS SELECT c._id AS _id, j.raw_string AS raw_string_jid, hidden, subject, created_timestamp, display_message_row_id, last_message_row_id, last_read_message_row_id, last_read_receipt_sent_message_row_id, last_important_message_row_id, archived, sort_timestamp, mod_tag, gen, spam_detection, unseen_earliest_message_received_time, unseen_message_count, unseen_missed_calls_count, unseen_row_count, plaintext_disabled, vcard_ui_dismissed, change_number_notified_message_row_id, show_group_description, ephemeral_expiration, last_read_ephemeral_message_row_id, ephemeral_setting_timestamp, ephemeral_disappearing_messages_initiator, unseen_important_message_count FROM chat c LEFT JOIN jid j ON c.jid_row_id=j._id

so it refers to the chat and jid tables. One solution could be to change the code so that it merges these two tables instead of chat_view, but from my understanding, based on the content, merging them is not as simple as appending the rows. I might be wrong though.

B16f00t commented 2 years ago

When I have some time, I plan to update a few things about the project

natario1 commented 2 years ago

For those who know how to build it and use it, I made a Java command line program that can merge databases: https://github.com/natario1/whatsapp-database-merger . It copies over many tables and updates all references. I spent quite some time investigating the database contents, maybe it can help you in your next update @B16f00t . Thanks for your work.

B16f00t commented 2 years ago

It would be a good idea to have that code in python and use it in the project.

B16f00t commented 2 years ago

153