2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Fix external replies in topic groups.

This commit is contained in:
John Preston
2023-10-31 10:39:54 +04:00
parent 475b2ac739
commit b793c06759
14 changed files with 65 additions and 33 deletions

View File

@@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/notifications_manager.h"
#include "history/history.h"
#include "history/history_item.h"
#include "history/history_item_helpers.h"
#include "history/view/history_view_element.h"
#include "core/application.h"
#include "apiwrap.h"
@@ -46,8 +47,10 @@ MTPInputReplyTo ReplyToForMTP(
}
}
} else if (replyTo.messageId || replyTo.topicRootId) {
const auto to = LookupReplyTo(history, replyTo.messageId);
const auto external = replyTo.messageId
&& (replyTo.messageId.peer != history->peer->id);
&& (replyTo.messageId.peer != history->peer->id
|| (replyTo.topicRootId != to->topicRootId()));
const auto quoteEntities = Api::EntitiesToMTP(
&history->session(),
replyTo.quote.entities,