Telegram-Mini-Apps / telegram-apps

Made from scratch TypeScript packages, examples and documentation you will surely need to start developing on Telegram Mini Apps.
https://docs.telegram-mini-apps.com/
MIT License
421 stars 88 forks source link

[Bug]: openTelegramLink does not close app on iOS #326

Open webdeb opened 2 months ago

webdeb commented 2 months ago

Telegram Application

Telegram for iOS

Describe the Bug

openTelegramLink does not close app on iOS when the mini app was opened from the same url (bot)

To Reproduce

Call openTelegramLink in an app which was opened on the same url.

Expected Behavior

openTelegramLink closes the app, goes to the desired target.

heyqbnk commented 2 months ago

Hey. What is the use case for opening the same app with the same url?

It is probably not that important, just interesting. I assume, that problem is in the Telegram application itself, not in the SDK. I will take a look soon.

webdeb commented 2 months ago

Hi Vladislav, the use case is the following: user clicks on "get invite link", so I generate one and send it via the bot, close the app, so the user can forward the message. I also found a workaround with miniApp.close()

recallyourname commented 1 month ago

Same happened to me when i was implementing the payment gateway: https://pay.wallet.tg/

On utils.openTelegramLink(directPayLink), iOS is the only platform that doesn't close the application

Looked pretty native at first glance (until i realized it is indeed a bug)