diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index fa4a28a4..1785bd7b 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -22647,7 +22647,9 @@ void MessagesManager::remove_message_dialog_notifications(Dialog *d, MessageId m void MessagesManager::send_update_message_send_succeeded(Dialog *d, MessageId old_message_id, const Message *m) const { CHECK(m != nullptr); CHECK(d->is_update_new_chat_sent); - d->yet_unsent_message_id_to_persistent_message_id.emplace(old_message_id, m->message_id); + if (!td_->auth_manager_->is_bot()) { + d->yet_unsent_message_id_to_persistent_message_id.emplace(old_message_id, m->message_id); + } send_closure( G()->td(), &Td::send_update, make_tl_object(get_message_object(d->dialog_id, m), old_message_id.get())); @@ -23590,7 +23592,9 @@ void MessagesManager::fail_send_message(FullMessageId full_message_id, int error << debug_add_message_to_dialog_fail_reason_; LOG(INFO) << "Send updateMessageSendFailed for " << full_message_id; - d->yet_unsent_message_id_to_persistent_message_id.emplace(old_message_id, m->message_id); + if (!td_->auth_manager_->is_bot()) { + d->yet_unsent_message_id_to_persistent_message_id.emplace(old_message_id, m->message_id); + } send_closure(G()->td(), &Td::send_update, make_tl_object(get_message_object(dialog_id, m), old_message_id.get(), error_code, error_message));