From 1fc9021f2369a6a841954b6364a65f8a1babbd24 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 27 Oct 2022 14:24:49 +0000 Subject: [PATCH] Update content of files --- data/web/corefork.telegram.org/api/bots/webapps.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/web/corefork.telegram.org/api/bots/webapps.html b/data/web/corefork.telegram.org/api/bots/webapps.html index 537c276b93..5bc7c027c8 100644 --- a/data/web/corefork.telegram.org/api/bots/webapps.html +++ b/data/web/corefork.telegram.org/api/bots/webapps.html @@ -46,7 +46,7 @@

Bots can offer users interactive HTML5 web apps to completely replace any website.

They support seamless authorization, integrated payments via multiple payment providers (with Google Pay and Apple Pay out of the box), delivering tailored push notifications to users, and much more.

-

This article offers a client-side overview of the implementation of bot web apps using the MTProto API: see here an overview of the web-app side JS API ».

+

This article offers a client-side overview of the implementation of bot web apps using the MTProto API: see here for an overview of the web-app side JS API ».

Outgoing events: Web app to client

Both simple and normal web apps can send web events starting with web_app_; see the web event documentation for the full list of events that can be sent by the web app to the client ».

Incoming events: Client to web app

@@ -66,10 +66,10 @@ @@ -148,7 +148,7 @@
  • An attachment menu »: in this case, no special flag should be set, unless the attachment menu is opened via a with a bot attachment menu deep link, in which case the start_parameter should be provided to messages.requestWebView.start_param, if present.
  • To open them, clients should call messages.requestWebView, and then open a webview using the url contained in the returned webViewResultUrl.

    -

    After loading the webview, until it is closed by a web_app_close event, the user client must invoke messages.prolongWebView every 60 seconds.

    +

    After loading the webview, until it is closed by a web_app_close event, the user client must invoke messages.prolongWebView every 60 seconds: if the method call returns QUERY_ID_INVALID, the webview must be closed.

    The opened URL's fragment parameters already contain basic information about the user and a query_id parameter, that is exposed by the bot web apps JS library: this query_id can then be used by the bot to invoke messages.sendWebViewResultMessage, passing an InputBotInlineResult constructor that will automatically send a message with optionally attached media, and even inline buttons on behalf of the user.

    Theme parameters

    Bot web apps can be themed according to the following theme parameters, passed as a JSON object to the theme_params parameter of the messages.requestSimpleWebView and messages.requestWebView methods.