Fix failed to send message identifier.

GitOrigin-RevId: dd5b699db7367bc7521514fe9e60b4c0583a79d6
This commit is contained in:
levlam 2018-04-13 00:29:01 +03:00
parent d35f1b9fc3
commit 75ea942c82

View File

@ -19362,7 +19362,8 @@ void MessagesManager::fail_send_message(FullMessageId full_message_id, int error
}
auto new_message_id = MessageId(old_message_id.get() - MessageId::TYPE_YET_UNSENT + MessageId::TYPE_LOCAL);
if (get_message_force(d, new_message_id) != nullptr || d->deleted_message_ids.count(new_message_id)) {
if (get_message_force(d, new_message_id) != nullptr || d->deleted_message_ids.count(new_message_id) ||
new_message_id.get() <= d->last_clear_history_message_id.get()) {
new_message_id = get_next_local_message_id(d);
}