From e9a6bee046b1d3bb28a097ea55a3dc4a1488c997 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 12 Dec 2024 12:18:43 +0400 Subject: [PATCH] Fix sending old topic messages. --- Telegram/SourceFiles/data/data_histories.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/data/data_histories.cpp b/Telegram/SourceFiles/data/data_histories.cpp index 0f428913a..f68eed90e 100644 --- a/Telegram/SourceFiles/data/data_histories.cpp +++ b/Telegram/SourceFiles/data/data_histories.cpp @@ -55,7 +55,8 @@ MTPInputReplyTo ReplyToForMTP( ? replyingToTopic->rootId() : Data::ForumTopic::kGeneralId) : (to ? to->topicRootId() : Data::ForumTopic::kGeneralId); - const auto replyToTopicId = to + const auto replyToTopicId = (to + && (to->history() != history || to->id != replyingToTopicId)) ? to->topicRootId() : replyingToTopicId; const auto external = replyTo.messageId