mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix General topic message links.
This commit is contained in:
parent
191ea6f0f4
commit
076f0e0800
1 changed files with 5 additions and 2 deletions
|
@ -691,7 +691,11 @@ QString ApiWrap::exportDirectMessageLink(
|
|||
auto linkThreadId = MsgId();
|
||||
auto linkThreadIsTopic = false;
|
||||
if (inRepliesContext) {
|
||||
if (const auto rootId = item->replyToTop()) {
|
||||
linkThreadIsTopic = item->history()->isForum();
|
||||
const auto rootId = linkThreadIsTopic
|
||||
? item->topicRootId()
|
||||
: item->replyToTop();
|
||||
if (rootId) {
|
||||
const auto root = item->history()->owner().message(
|
||||
channel->id,
|
||||
rootId);
|
||||
|
@ -711,7 +715,6 @@ QString ApiWrap::exportDirectMessageLink(
|
|||
} else {
|
||||
// Reply in a thread, maybe comment in a private channel.
|
||||
linkThreadId = rootId;
|
||||
linkThreadIsTopic = (item->topicRootId() == rootId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue