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
400 stars 79 forks source link

[Feature]: send message to user/group in mini app #291

Closed guotie closed 2 months ago

guotie commented 2 months ago

Is your feature request related to a problem? Please describe.

send message/link to user/group in mini app, when user or group user click the link, the user will be launch the mini app.

Describe the solution you'd like

send message/link to user/group in mini app, when user or group user click the link, the user will be launch the mini app.

Describe alternatives you've considered

we cannot do such things currently, which is very import for mini-app to reach more people

Additional context

No response

guotie commented 2 months ago

In wechat, we can send link to user in wechat's mini-program

heyqbnk commented 2 months ago

You can use the share links to implement the functionality you need: https://core.telegram.org/api/links#share-links

In your case such a link could be https://t.me/share?url=t.me%2Fmybot%2Fmyapp&text=Check%20this%20app

guotie commented 2 months ago

but share link cannot send from mini-app to a chat/chat group

heyqbnk commented 2 months ago

but share link cannot send from mini-app to a chat/chat group

Why not? You should use the openTelegramLink method and pass this link there

https://docs.telegram-mini-apps.com/packages/tma-js-sdk/components/utils#opentelegramlink

guotie commented 2 months ago

Okey, I'll try it