Drop cached attachment menu bots when database is deleted.

This commit is contained in:
levlam 2023-01-02 13:51:04 +03:00
parent c8e0c2fedc
commit 4258030967
2 changed files with 4 additions and 2 deletions

View File

@ -55,6 +55,8 @@ class AttachMenuManager final : public Actor {
void get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const;
static string get_attach_menu_bots_database_key();
private:
static const int32 PING_WEB_VIEW_TIMEOUT = 60;
@ -135,8 +137,6 @@ class AttachMenuManager final : public Actor {
void send_update_attach_menu_bots() const;
static string get_attach_menu_bots_database_key();
void save_attach_menu_bots();
void on_reload_attach_menu_bots(Result<telegram_api::object_ptr<telegram_api::AttachMenuBots>> &&result);

View File

@ -6,6 +6,7 @@
//
#include "td/telegram/TdDb.h"
#include "td/telegram/AttachMenuManager.h"
#include "td/telegram/DialogDb.h"
#include "td/telegram/files/FileDb.h"
#include "td/telegram/Global.h"
@ -390,6 +391,7 @@ Status TdDb::init_sqlite(const TdParameters &parameters, const DbKey &key, const
binlog_pmc.erase("saved_contact_count");
binlog_pmc.erase("old_featured_sticker_set_count");
binlog_pmc.erase("invalidate_old_featured_sticker_sets");
binlog_pmc.erase(AttachMenuManager::get_attach_menu_bots_database_key());
}
binlog_pmc.force_sync({});