Skip to content

Use a proper JavaScript script to send Mini Apps events#1690

Open
heyqbnk wants to merge 1 commit intoTelegramMessenger:masterfrom
heyqbnk:master
Open

Use a proper JavaScript script to send Mini Apps events#1690
heyqbnk wants to merge 1 commit intoTelegramMessenger:masterfrom
heyqbnk:master

Conversation

@heyqbnk
Copy link

@heyqbnk heyqbnk commented Feb 19, 2025

At the moment, developers have problem calling window.TelegramGameProxy.receiveEvent even when it is undefined. A possible reason is that the client relies on the telegram-web-app.js file inserted in the head tag of the web application. This file defines required field in-place, but still, we have a lot of developers not using this approach and using the async one.

To solve the problem, I offer to check if the path window.TelegramGameProxy.receiveEvent exists at all, and call the function only if it does.

You can learn more about the issues here:
Telegram-Mini-Apps/tma.js#664

@heyqbnk heyqbnk changed the title Use a proper script to call an event in Mini Apps Feb 19, 2025
@CLAassistant
Copy link

CLAassistant commented Feb 27, 2025

CLA assistant check
All committers have signed the CLA.

@woat
Copy link

woat commented Jun 25, 2025

hello friends

can we merge this or na

cuz like

its still broken

Screenshot 2025-06-25 at 14 33 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants