Skip to content

1860 app inappbrowsercheck not working with new telegram - #1934

Open
MrDirkelz wants to merge 2 commits into
mainfrom
1860-app-inappbrowsercheck-not-working-with-new-telegram
Open

1860 app inappbrowsercheck not working with new telegram#1934
MrDirkelz wants to merge 2 commits into
mainfrom
1860-app-inappbrowsercheck-not-working-with-new-telegram

Conversation

@MrDirkelz

Copy link
Copy Markdown
Collaborator

No description provided.

@MrDirkelz MrDirkelz linked an issue Aug 21, 2026 that may be closed by this pull request

@ivanslabbert ivanslabbert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a npm package / github repo that detects in-app browsers, with Telegram support. Check if it has been updated to detect Telegram correctly (after Telegram removed the API that was previously used by the library to detect the Telegram in-app browser).

@MrDirkelz
MrDirkelz force-pushed the 1860-app-inappbrowsercheck-not-working-with-new-telegram branch from c067151 to e844409 Compare August 28, 2026 09:17
@MrDirkelz MrDirkelz self-assigned this Aug 28, 2026
Sample 10% of external app entries to capture real user agent,
referrer, and detection result — Telegram's in-app browser doesn't
always self-identify (e.g. never on iOS), so isTelegramBrowser() can
false-negative and this data helps close the gap.
@MrDirkelz
MrDirkelz force-pushed the 1860-app-inappbrowsercheck-not-working-with-new-telegram branch from ae0454c to 2ba0a68 Compare August 28, 2026 11:21

@johan-bell johan-bell left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The move to inapp-spy introduces a regression for installed users:

  • inAppBrowser.ts:41 — inapp-spy's generic pattern (iPhone|iPod|iPad)(?!.*Safari/) matches iOS home-screen PWA user agents (they omit Safari/), so installed iOS users would get the "open in your browser" interstitial on every cold launch. Please gate on the existing isInstalledStandalone() from app/src/globalConfig.ts.
  • inAppBrowser.ts:15 — the comment saying inapp-spy has no Telegram detection isn't accurate: its getDetectClientSide already checks TelegramWebviewProxy; only __tg__webview_set is genuinely additional.
  • inAppBrowser.ts:27 — the hand-rolled bridge check covers fewer properties (TelegramWebview, TelegramWebviewProxyProto missing) than the library it supplements.
  • Test gap: an iOS standalone user-agent case in playwright-tests/app/flows/in-app-browser.spec.ts would have caught the PWA regression.

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.

APP: InAppBrowserCheck not working with new telegram

3 participants