Support startapp and start params - #2289
Open
benonymus wants to merge 1 commit into
Open
Conversation
vhf2jghn76-sys
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A deep link carrying both
startappandstartnow opens the Mini App and keeps thestartpayload. If the user dismisses the Mini App launch confirmation, the chat's Start button sends/start <payload>instead of a bare/start.Why
The parse loop returns on the first of the two parameters it encounters, so only one ever survived.
tg://resolvelinks are rebuilt withstartappahead ofstart, sostartappalways won andstartwas discarded — dismissing the launch prompt left the user in the bot chat with the bot unstarted and the payload gone, recoverable only by opening the original link again. Fort.melinks the raw query order decided instead, so?start=…&startapp=…took the bot branch and the Mini App never opened.How
ParsedInternalPeerUrlParameter.appStartcarries abotStartPayload, threaded throughChatControllerInitialBotAppStarttopresentBotApp.startappkeeps priority regardless of URL order; a newdismissedWithoutConfirmationhook on the launch confirmation puts the payload on the Start button. Referral start payloads are unaffected. If the Mini App can't launch at all — the bot has no web app, or a named app fails to resolve — a link that carriesstartnow falls back to that payload as a bot start rather than opening a plain chat; links withoutstartbehave as before.Drive-by: also clears a stale progress indicator left in the chat title panel when a launch confirmation is dismissed — a pre-existing issue on the same path.
Testing
Use an account that has never started the target bot. Open a link with both parameters, dismiss the launch confirmation, tap Start, and check the raw webhook payload rather than the rendered message.