From 356051f59d948192872f1fe8f5b470b8075b9b83 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 22 Apr 2020 17:11:29 +0300 Subject: [PATCH] Do not warn on attaching new message to the next yet unsent message. Could happen when replying a message received through getMessage. GitOrigin-RevId: c4c77ae81eab08cce855ba32a5756477340b66af --- td/telegram/MessagesManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 7c25e88d..304fa5eb 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -26418,8 +26418,10 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq if (next_message != nullptr) { CHECK(!next_message->have_previous); LOG(INFO) << "Attach " << message_id << " to the next " << next_message->message_id; - LOG_IF(ERROR, from_update) << "Attach " << message_id << " from " << source << " to the next " - << next_message->message_id << " in " << dialog_id; + if (from_update && !next_message->message_id.is_yet_unsent()) { + LOG(ERROR) << "Attach " << message_id << " from " << source << " to the next " << next_message->message_id + << " in " << dialog_id; + } message->have_next = true; message->have_previous = next_message->have_previous; next_message->have_previous = true;