mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix replying in the same history.
This commit is contained in:
parent
bde39970a0
commit
d831775e2f
1 changed files with 9 additions and 1 deletions
|
@ -48,9 +48,17 @@ MTPInputReplyTo ReplyToForMTP(
|
|||
}
|
||||
} else if (replyTo.messageId || replyTo.topicRootId) {
|
||||
const auto to = LookupReplyTo(history, replyTo.messageId);
|
||||
const auto replyingToTopicId = replyTo.topicRootId
|
||||
? replyTo.topicRootId
|
||||
: Data::ForumTopic::kGeneralId;
|
||||
const auto replyToTopicId = !to
|
||||
? replyingToTopicId
|
||||
: to->topicRootId()
|
||||
? to->topicRootId()
|
||||
: Data::ForumTopic::kGeneralId;
|
||||
const auto external = replyTo.messageId
|
||||
&& (replyTo.messageId.peer != history->peer->id
|
||||
|| (replyTo.topicRootId != to->topicRootId()));
|
||||
|| replyingToTopicId != replyToTopicId);
|
||||
const auto quoteEntities = Api::EntitiesToMTP(
|
||||
&history->session(),
|
||||
replyTo.quote.entities,
|
||||
|
|
Loading…
Add table
Reference in a new issue