From c47dde6ea9b81ec19f291d518c51e40719c554cd Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 3 May 2023 16:28:40 +0300 Subject: [PATCH] Don't warn about yet unsent messages with small identifiers for bots. --- td/telegram/MessagesManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 19f953d4a..d4a4c1fba 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -34408,7 +34408,8 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq if (from_update) { CHECK(have_next); CHECK(have_previous); - if (message_id <= d->last_new_message_id && dialog_type != DialogType::Channel && !has_qts_messages(dialog_id)) { + if (message_id <= d->last_new_message_id && dialog_type != DialogType::Channel && !has_qts_messages(dialog_id) && + (message_id.is_server() || !td_->auth_manager_->is_bot())) { LOG(ERROR) << "New " << message_id << " in " << dialog_id << " from " << source << " has identifier less than last_new_message_id = " << d->last_new_message_id; }