Improve bot with forum opening.

This commit is contained in:
John Preston
2025-09-05 18:22:11 +04:00
parent 900c12d1d0
commit ca4caec819
10 changed files with 36 additions and 28 deletions
+5 -5
View File
@@ -206,11 +206,11 @@ void Thread::setHasPinnedMessages(bool has) {
}
void Thread::saveMeAsActiveSubsectionThread() {
if (const auto channel = owningHistory()->peer->asChannel()) {
if (channel->useSubsectionTabs()) {
if (const auto forum = channel->forum()) {
forum->saveActiveSubsectionThread(this);
} else if (const auto monoforum = channel->monoforum()) {
if (const auto peer = owningHistory()->peer; peer->useSubsectionTabs()) {
if (const auto forum = peer->forum()) {
forum->saveActiveSubsectionThread(this);
} else if (const auto channel = peer->asChannel()) {
if (const auto monoforum = channel->monoforum()) {
monoforum->saveActiveSubsectionThread(this);
}
}