Skip to content

Fix startapp/startattach deeplinks for bots with Threaded Mode.#30543

Open
rdmcd wants to merge 1 commit intotelegramdesktop:devfrom
rdmcd:fix/startapp-forum-bot-deeplink
Open

Fix startapp/startattach deeplinks for bots with Threaded Mode.#30543
rdmcd wants to merge 1 commit intotelegramdesktop:devfrom
rdmcd:fix/startapp-forum-bot-deeplink

Conversation

@rdmcd
Copy link
Copy Markdown
Contributor

@rdmcd rdmcd commented Apr 8, 2026

Follow-up to #30446 — in that PR I fixed only named bot app links (t.me/bot/appname) by moving isForum() below the BotApp resolve type handler, but missed that ?startapp
(default mini app), ?startattach and ?attach deeplinks were handled inside the final else block and still intercepted by isForum().

Extract attach bot handlers (attachBotUsername, attachBotMainOpen,
attachBotToggleCommand) from the final else block into standalone
branches above the isForum() check, so forum view doesn't intercept
bot deeplinks. Follows the same reorder approach as telegramdesktop#30446.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 8, 2026 11:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Telegram Desktop deeplink handling for bot mini-app links (?startapp default mini app, ?startattach, and ?attach) when the target bot has Threaded Mode enabled, by ensuring those deeplink handlers run before the peer->isForum() branch that previously intercepted the flow.

Changes:

  • Extract attachBotUsername, attachBotMainOpen, and attachBotToggleCommand handling out of the final else block.
  • Reorder deeplink handling so attach/startapp/startattach branches execute before peer->isForum() without changing the isForum() condition itself.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants