Don't try to remove chat from recent for bots.

This commit is contained in:
levlam 2024-01-04 19:06:50 +03:00
parent 3003679192
commit f43807ebbf

View File

@ -11795,8 +11795,10 @@ void MessagesManager::on_dialog_deleted(DialogId dialog_id, Promise<Unit> &&prom
d->need_restore_reply_markup = true;
on_dialog_updated(dialog_id, "on_dialog_deleted");
}
recently_found_dialogs_.remove_dialog(dialog_id);
recently_opened_dialogs_.remove_dialog(dialog_id);
if (!td_->auth_manager_->is_bot()) {
recently_found_dialogs_.remove_dialog(dialog_id);
recently_opened_dialogs_.remove_dialog(dialog_id);
}
if (dialog_id.get_type() == DialogType::Channel) {
G()->td_db()->get_binlog_pmc()->erase(get_channel_pts_key(dialog_id));
}