Closed ElDavoo closed 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";
I love you bro! I opened a pull request with your query.
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..
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
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.