telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
24.88k stars 4.94k forks source link

Share links don't work in Web App #27923

Closed Viiprogrammer closed 1 week ago

Viiprogrammer commented 2 weeks ago

Steps to reproduce

  1. Open webapp
  2. Call 2.1. webApp.openTelegramLink('https://t.me/share?url=' + address) or 2.2. webApp.openLink('https://t.me/share?url=' + address.value)
  3. image

Expected behaviour

Open link as share link

Actual behaviour

image

Operating system

Ubuntu 22.04.4 LTS x86_64 / Windows 11

Version of Telegram Desktop

5.0.1

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

john-preston commented 1 week ago

@Viiprogrammer

The correct link to share looks like: https://t.me/share/url?url={url}

Viiprogrammer commented 1 week ago

@Viiprogrammer

The correct link to share looks like: https://t.me/share/url?url={url}

Hmm, this actually works https://core.telegram.org/widgets/share#custom-buttons

https://t.me/share?url={url} also works too, but outside the WebApp and not present in docs.

Solved, thanks for your answer!