Do not save yet unsent message IDs as deleted message IDs.
GitOrigin-RevId: 459bc8dab615ae509da8cd2ed23832362f37f41b
This commit is contained in:
parent
80fb2baf6e
commit
226cf0e6dc
@ -26967,20 +26967,20 @@ void MessagesManager::delete_message_from_database(Dialog *d, MessageId message_
|
||||
return;
|
||||
}
|
||||
|
||||
if (message_id.is_yet_unsent()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_permanently_deleted) {
|
||||
if (message_id.is_scheduled() && message_id.is_scheduled_server()) {
|
||||
d->deleted_scheduled_server_message_ids.insert(message_id.get_scheduled_server_message_id());
|
||||
} else {
|
||||
if (!(td_->auth_manager_->is_bot() && m->is_failed_to_send)) {
|
||||
if (m == nullptr || !td_->auth_manager_->is_bot() || !m->is_failed_to_send) {
|
||||
d->deleted_message_ids.insert(message_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (message_id.is_yet_unsent()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m->random_id != 0 && (m->is_outgoing || d->dialog_id == get_my_dialog_id())) {
|
||||
message_random_ids_.erase(m->random_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user