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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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/telegram-apps#664

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

CLAassistant commented Feb 27, 2025

CLA assistant check
All committers have signed the CLA.

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.

2 participants