Dexter2389 / whatsapp-backup-chat-viewer

Extract WhatsApp conversations from the app's SQLite database and exporting them as JSON or TXT files
BSD 2-Clause "Simplified" License
34 stars 5 forks source link

`to_txt` breaks for few messages (#L98 `if-elif` loop) #12

Closed Dexter2389 closed 2 years ago

Dexter2389 commented 2 years ago

There are messages that have text_data, media and reply_to as None which causes this if-elif loop to break.

Dexter2389 commented 2 years ago

After investigating this issue, it was found that the messages that were breaking this if-elif loop, were from message_location table and message_payment_invite table.

Since message_payment_invite is unimportant, we can skip that for now and handle it by having an else statement to handle it.

To handle message_location we build an entirely new resolver and add it as a Message class field.