SDK icon indicating copy to clipboard operation
SDK copied to clipboard

WebApp.shareMessage call only once

Open ksupipr opened this issue 9 months ago • 4 comments

Hello I call from server bot id message for share and send by WebApp.shareMessage. I close popup or send this message to user. One more time get id message and send by WebApp.shareMessage and... nothing and error in console '[Telegram.WebApp] Share message is already opened'

How I fix it?

ksupipr avatar Mar 28 '25 11:03 ksupipr

@kuhel Помоги пожалуйста

ksupipr avatar Mar 28 '25 11:03 ksupipr

@ksupipr Hi, bro. Did you fix it? I just met this bug and have not found a method to fix it.

yingjieweb avatar Apr 10 '25 09:04 yingjieweb

@ksupipr Hi, bro. Did you fix it? I just met this bug and have not found a method to fix it.

Hi. Not found legal method ) I send message for this

window.Telegram.WebView.postEvent(
  'web_app_send_prepared_message',
  (result?: boolean) => { ...callback... },
  { id: mess_id }
);

ksupipr avatar Apr 10 '25 09:04 ksupipr

@ksupipr Thanks for your suggestion! I have already implemented your solution using Telegram.WebView.postEvent('web_app_send_prepared_message', ...) instead of WebApp.shareMessage().

yingjieweb avatar Apr 11 '25 12:04 yingjieweb