Attempt to fix sending messages to broken topics.

This commit is contained in:
John Preston 2024-05-15 18:55:56 +04:00
parent 39c1da6642
commit f10f3c08de

View file

@ -3543,7 +3543,8 @@ void HistoryItem::createComponentsHelper(HistoryItemCommonFields &&fields) {
const auto topicPost = config.reply.externalPeerId
? (replyTo.topicRootId
&& (replyTo.topicRootId != Data::ForumTopic::kGeneralId))
: (LookupReplyIsTopicPost(to)
: (topic
|| LookupReplyIsTopicPost(to)
|| (to && to->Has<HistoryServiceTopicInfo>())
|| (forum && forum->creating(config.reply.topMessageId)));
config.reply.topicPost = topicPost ? 1 : 0;