mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +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) {
|
} else if (replyTo.messageId || replyTo.topicRootId) {
|
||||||
const auto to = LookupReplyTo(history, replyTo.messageId);
|
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
|
const auto external = replyTo.messageId
|
||||||
&& (replyTo.messageId.peer != history->peer->id
|
&& (replyTo.messageId.peer != history->peer->id
|
||||||
|| (replyTo.topicRootId != to->topicRootId()));
|
|| replyingToTopicId != replyToTopicId);
|
||||||
const auto quoteEntities = Api::EntitiesToMTP(
|
const auto quoteEntities = Api::EntitiesToMTP(
|
||||||
&history->session(),
|
&history->session(),
|
||||||
replyTo.quote.entities,
|
replyTo.quote.entities,
|
||||||
|
|
Loading…
Add table
Reference in a new issue