Do not save yet_unsent_message_id to persistent_message_id correspondence for bots.
GitOrigin-RevId: 850f7ac5fc0bb348985b02c46812a32b64018cc5
This commit is contained in:
parent
06e74cfba9
commit
4afc32d9f9
@ -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<td_api::updateMessageSendSucceeded>(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<td_api::updateMessageSendFailed>(get_message_object(dialog_id, m), old_message_id.get(),
|
||||
error_code, error_message));
|
||||
|
Loading…
Reference in New Issue
Block a user