Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open telegram link after switch account #41

Open
dr4kedk opened this issue Dec 19, 2024 · 1 comment
Open

Cannot open telegram link after switch account #41

dr4kedk opened this issue Dec 19, 2024 · 1 comment
Labels
TG Issue Issue that is related rather to Telegram than to this library

Comments

@dr4kedk
Copy link

dr4kedk commented Dec 19, 2024

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"

@ducyb782001
Copy link

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

@ArthurStam ArthurStam added the TG Issue Issue that is related rather to Telegram than to this library label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TG Issue Issue that is related rather to Telegram than to this library
Development

No branches or pull requests

3 participants