Skip to main content

messages.prolongWebView

Indicate to the server (from the user side) that the user is still using a web app. If the method returns a QUERY_ID_INVALID error, the webview must be closed.

func (c *Client) MessagesProlongWebView(ctx context.Context, request *MessagesProlongWebViewRequest) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesProlongWebView(ctx, &tg.MessagesProlongWebViewRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
SilentboolWhether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent silently (no notifications for the receivers).
PeerInputPeerClassyesDialog where the web app was opened.
BotInputUserClassyesBot that owns the web app
QueryIDint64yesWeb app interaction ID obtained from messages.requestWebView
ReplyToInputReplyToClassIf set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to the specified message or story.
SendAsInputPeerClassOpen the web app as the specified peer

Returns

bool

Possible errors

CodeTypeDescription
400BOT_INVALIDThis is not a valid bot.

References