mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 linkThreadId = MsgId();
|
||||||
auto linkThreadIsTopic = false;
|
auto linkThreadIsTopic = false;
|
||||||
if (inRepliesContext) {
|
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(
|
const auto root = item->history()->owner().message(
|
||||||
channel->id,
|
channel->id,
|
||||||
rootId);
|
rootId);
|
||||||
|
@ -711,7 +715,6 @@ QString ApiWrap::exportDirectMessageLink(
|
||||||
} else {
|
} else {
|
||||||
// Reply in a thread, maybe comment in a private channel.
|
// Reply in a thread, maybe comment in a private channel.
|
||||||
linkThreadId = rootId;
|
linkThreadId = rootId;
|
||||||
linkThreadIsTopic = (item->topicRootId() == rootId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue