Skip to content

Commit caa0cbd

Browse files
committed
Fix startapp/startattach/text links for bot forums
Task: 2026/10/30/keep-startapp-startattach-and-text-links-working-for-bots-with-topics
1 parent d1d2500 commit caa0cbd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎Telegram/SourceFiles/window/window_session_controller.cpp‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ void SessionNavigation::showPeerByLinkResolved(
718718
&& (info.resolveType == ResolveType::Default)
719719
&& IsServerMsgId(info.messageId)
720720
&& !info.attachBotToggleCommand;
721+
const auto botLinkAction = bot
722+
&& !botForumPost
723+
&& (info.attachBotToggleCommand || !info.text.isEmpty());
721724

722725
// t.me/username/012345 - we thought it was a channel post link, but
723726
// after resolving the username we found out it is a bot.
@@ -838,7 +841,7 @@ void SessionNavigation::showPeerByLinkResolved(
838841
info.startAdminRights);
839842
} else if (resolveType == ResolveType::Boost && peer->isChannel()) {
840843
resolveBoostState(peer->asChannel());
841-
} else if (peer->isForum()) {
844+
} else if (peer->isForum() && !botLinkAction) {
842845
if (!msgId || !useRequestedMessageId) {
843846
applyBotStartToken();
844847
parentController()->showForum(peer->forum(), params, msgId);

0 commit comments

Comments
 (0)