andreas-mausch / whatsapp-viewer

Small tool to display chats from the Android msgstore.db database (crypt12)
https://andreas-mausch.de/whatsapp-viewer/
MIT License
1.23k stars 381 forks source link

"chat_list" does not exist anymore #127

Closed ElDavoo closed 2 years ago

ElDavoo commented 2 years ago

I'm opening a separate "tracker" issue as on recent WhatsApp versions the chat_list table has been deleted, making the program non-functional. It has been replaced by the "chat" table, which, however, has different fields. The two tables (chat and chat_list) co-existed on the databases for a period of time, in order to ensure a smooth transition.

ReMiOS commented 2 years ago

Had same problem, found a solution

change Database.cpp and build with Visual Studio

---------------------Current Code-------------------------

void WhatsappDatabase::getChats(Settings &settings, std::vector<WhatsappChat*> &chats)
{
    const char *query = "SELECT chat_list.key_remote_jid, chat_list.subject, chat_list.creation, max(messages.timestamp) " \
                        "FROM chat_list " \
                        "LEFT OUTER JOIN messages on messages.key_remote_jid = chat_list.key_remote_jid " \
                        "GROUP BY chat_list.key_remote_jid, chat_list.subject, chat_list.creation " \
                        "ORDER BY max(messages.timestamp) desc";

--------------------NEW code--------------------------

void WhatsappDatabase::getChats(Settings &settings, std::vector<WhatsappChat*> &chats)
{
    const char *query = "SELECT chat_view.raw_string_jid, chat_view.subject, chat_view.created_timestamp, max(messages.timestamp) " \
                        "FROM chat_view " \
                        "LEFT OUTER JOIN messages on messages.key_remote_jid = chat_view.raw_string_jid " \
                        "WHERE chat_view.hidden = '0' "\
                        "GROUP BY chat_view.raw_string_jid, chat_view.subject, chat_view.created_timestamp " \
                        "ORDER BY max(messages.timestamp) desc";
ElDavoo commented 2 years ago

I love you bro! I opened a pull request with your query.

rizkyperbawa commented 1 year ago

Had same problem, found a solution

change Database.cpp and build with Visual Studio

---------------------Current Code-------------------------

void WhatsappDatabase::getChats(Settings &settings, std::vector<WhatsappChat*> &chats)
{
  const char *query = "SELECT chat_list.key_remote_jid, chat_list.subject, chat_list.creation, max(messages.timestamp) " \
                      "FROM chat_list " \
                      "LEFT OUTER JOIN messages on messages.key_remote_jid = chat_list.key_remote_jid " \
                      "GROUP BY chat_list.key_remote_jid, chat_list.subject, chat_list.creation " \
                      "ORDER BY max(messages.timestamp) desc";

--------------------NEW code--------------------------

void WhatsappDatabase::getChats(Settings &settings, std::vector<WhatsappChat*> &chats)
{
  const char *query = "SELECT chat_view.raw_string_jid, chat_view.subject, chat_view.created_timestamp, max(messages.timestamp) " \
                      "FROM chat_view " \
                      "LEFT OUTER JOIN messages on messages.key_remote_jid = chat_view.raw_string_jid " \
                      "WHERE chat_view.hidden = '0' "\
                      "GROUP BY chat_view.raw_string_jid, chat_view.subject, chat_view.created_timestamp " \
                      "ORDER BY max(messages.timestamp) desc";

im new to programming.. im trying to install visual studio and edit this database.cpp.. but when im trying to build or compile it.. it says error C1083 cannot open include file : vld.h no such file or directory

help please i need this aplication to read my backup.. i need the data on the chats..

ReMiOS commented 1 year ago

https://github.com/andreas-mausch/whatsapp-viewer/issues/151#issuecomment-1229244368

Things22 commented 12 months ago

pls send the new edited file, i realllllllyyyy need it, im not programmer but not 100% noob, if you can send the new edited software with this new code, pls dude