SDK icon indicating copy to clipboard operation
SDK copied to clipboard

Cannot open telegram link after switch account

Open dr4kedk opened this issue 11 months ago • 1 comments

Describe the bug I'm trying to build mini app where user can access interesting channel, group ... For the first time user start telegram, they click on the button "Open" contain telegram link. It will open perfectly. But when user switch to another account and start mini app, click open button, it not go to channel/chat If user want to open link inside mini app, they have to quit telegram and then start telegram again

Code i'm using to open telegram link

import WebApp from "@twa-dev/sdk";

export const openTelegramLink = (link: string) => {
try {
if (typeof window !== "undefined") {
WebApp.openTelegramLink(link)
}
} catch (error) {
console. log (error);

Telegram link sample: https://t.me/tapps_bot

Steps to reproduce Step 1: Create simple mini app, add button "Open" open telegram link when click. Sample: https://t.me/tapps_bot, link of Telegram Apps Center bot Step 2: Start Telegram with Account A, open mini app and click button "Open", it will redirect to chat with Telegram Apps Center Step 3: Close mini app, switch to Account B, open mini app, click button "Open", it still good Step 4: Close mini app, switch to Account A, open mini app, click button "Open", now nothing happen, some time miniapp has disappear Step 5: Quit telegram, start again so it will be open link perfectly from step 1

Expected behavior I expected user still go to chat with Telegram Apps Center, still can open link after switch account many times

How often does this bug happen? Always when following these steps

Platform OS: MacOS Monterey 12.7.6 Chrome: Version 130.0.6723.117 (Official Build) (x86_64) NextJs: 14.2.13

Package Version @twa-dev/sdk": "^8.0.1" "typescript":"^5" "nextjs":14.2.13 "react":"^18"

dr4kedk avatar Dec 19 '24 07:12 dr4kedk

Sound big issue, i see this issue is still on Blum or some famous miniapp. Need fix soon

ducyb782001 avatar Dec 19 '24 08:12 ducyb782001