2
0
mirror of https://github.com/ars3niy/tdlib-purple synced 2025-09-05 00:25:24 +00:00

Finished fetching message history when tdlib skips messages

This commit is contained in:
Arseniy Lartsev
2021-01-03 13:18:33 +01:00
parent 67962619d4
commit 41b514634b
9 changed files with 212 additions and 40 deletions

View File

@@ -434,14 +434,18 @@ void removeGroupChat(PurpleAccount *purpleAccount, const td::td_api::chat &chat)
if (purpleChat)
purple_blist_remove_chat(purpleChat);
std::string setting = lastMessageSetting(getId(chat));
purple_account_remove_setting(purpleAccount, setting.c_str());
// TODO: uncomment when updateNewChat(chat_list=NULL) + updateChatChatList(non-NULL) at login
// no longer removes chat
//std::string setting = lastMessageSetting(getId(chat));
//purple_account_remove_setting(purpleAccount, setting.c_str());
}
void removePrivateChat(TdAccountData &account, const td::td_api::chat &chat)
{
std::string setting = lastMessageSetting(getId(chat));
purple_account_remove_setting(account.purpleAccount, setting.c_str());
// TODO: uncomment when updateNewChat(chat_list=NULL) + updateChatChatList(non-NULL) at login
// no longer removes chat
//std::string setting = lastMessageSetting(getId(chat));
//purple_account_remove_setting(account.purpleAccount, setting.c_str());
}
void saveChatLastMessage(TdAccountData &account, ChatId chatId, MessageId messageId)