aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/RepliedMessageInfo.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2025-10-10 16:46:51 +0300
committerlevlam <levlam@telegram.org>2025-10-10 16:46:51 +0300
commitcc82ae4e80a3b17f9932b5ebba1686789ecc66e1 (patch)
treeef4d64c4121482f6b4cea8d94208ef61d4f9f389 /td/telegram/RepliedMessageInfo.cpp
parent40c8bbca25eb546d007483cd56b204c7a8647e23 (diff)
Don't warn for topic messages that become a reply.
Diffstat (limited to 'td/telegram/RepliedMessageInfo.cpp')
-rw-r--r--td/telegram/RepliedMessageInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/td/telegram/RepliedMessageInfo.cpp b/td/telegram/RepliedMessageInfo.cpp
index ff42f30fe..2ade7f569 100644
--- a/td/telegram/RepliedMessageInfo.cpp
+++ b/td/telegram/RepliedMessageInfo.cpp
@@ -6,6 +6,7 @@
//
#include "td/telegram/RepliedMessageInfo.h"
+#include "td/telegram/AuthManager.h"
#include "td/telegram/Dependencies.h"
#include "td/telegram/DialogManager.h"
#include "td/telegram/MessageContent.h"
@@ -230,6 +231,11 @@ bool RepliedMessageInfo::need_reply_changed_warning(
// move of reply to the top thread message after deletion of the replied message
return false;
}
+ if (is_yet_unsent && td->auth_manager_->is_bot() && old_top_thread_message_id.is_valid() &&
+ new_info.dialog_id_ == DialogId() && new_info.message_id_ != MessageId()) {
+ // move or initialization of reply to the forum topic creation message after deletion of the replied message
+ return false;
+ }
if (new_info.todo_item_id_ != 0 && old_info.todo_item_id_ == 0) {
// a message received by an old version
return false;