mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Fix replying in the same history.
This commit is contained in:
@@ -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,
|
||||||
|
Reference in New Issue
Block a user