From 36687f984b3da02378ccdd84be388b303b35736a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 30 Mar 2023 16:30:22 +0000 Subject: [PATCH] Update content of files --- data/web/corefork.telegram.org/api/auth.html | 5 +- .../api/bots/webapps.html | 37 ++++++++++++ .../web/corefork.telegram.org/api/layers.html | 26 ++++---- data/web/corefork.telegram.org/api/links.html | 14 +---- .../constructor/appWebViewResultUrl.html | 30 +++------- .../constructor/attachMenuBot.html | 2 +- .../constructor/auth.authorization | 6 +- .../constructor/auth.loggedOut | 8 +-- .../constructor/botApp.html | 60 +++++++------------ .../constructor/botAppNotModified.html | 13 ++-- .../constructor/defaultHistoryTTL.html | 25 ++------ .../constructor/dialog.html | 2 + .../constructor/forumTopic.html | 34 ++++------- .../method/account.reorderUsernames | 2 +- .../method/channels.createChannel | 3 +- .../method/channels.createForumTopic | 8 ++- .../method/channels.editForumTopic | 30 +++++++++- .../method/messages.createChat | 3 +- .../method/messages.getBotApp | 50 +++++----------- .../method/messages.requestAppWebView | 1 + .../method/messages.setDefaultHistoryTTL | 27 ++------- .../method/messages.toggleBotInAttachMenu | 4 +- .../type/AppWebViewResult.html | 32 +++------- data/web/corefork.telegram.org/type/Bool.html | 2 +- .../corefork.telegram.org/type/BotApp.html | 28 ++++----- .../type/DefaultHistoryTTL.html | 29 ++------- .../type/ForumTopic.html | 26 +++----- .../type/ReadParticipantDate.html | 15 ++--- .../type/RequestPeerType.html | 23 ++----- .../type/StickerKeyword.html | 15 ++--- .../type/TextWithEntities.html | 20 +++---- .../corefork.telegram.org/type/Updates.html | 4 +- .../corefork.telegram.org/type/Username.html | 15 ++--- .../type/account.AutoSaveSettings | 25 ++------ .../corefork.telegram.org/type/help.AppConfig | 32 +++------- .../type/messages.BotApp | 32 +++------- .../type/messages.ForumTopics | 30 +++------- 37 files changed, 265 insertions(+), 453 deletions(-) diff --git a/data/web/corefork.telegram.org/api/auth.html b/data/web/corefork.telegram.org/api/auth.html index 576f073d4e..9a73e8ae32 100644 --- a/data/web/corefork.telegram.org/api/auth.html +++ b/data/web/corefork.telegram.org/api/auth.html @@ -51,9 +51,10 @@

To show a nicely formatted and validated phone number field, the help.countriesList constructor can be obtained using the help.getCountriesList method.
The help.countriesList config is then used as described here ».

Then, a text message containing an authorization code is sent to the user's phone using auth.sendCode.
-However, this is not always the case, if logout tokens are used:

-

Logout tokens

+However, this is not always the case, if future auth tokens are used:

+

Future auth tokens

When invoking auth.logOut on a previously authorized session with 2FA enabled, the server may return a future_auth_token, which should be stored in the local database.
+A future_auth_token is also contained in the auth.authorization returned when logging in.
At all times, the logout token database should contain at most 20 tokens: evict older tokens as new tokens are added.
When invoking auth.sendCode, all logout tokens present in the database should be provided to codeSettings.logout_tokens.
If any of the logout tokens matches the account we're trying to login into and the token hasn't expired, auth.sendCode will directly return a SESSION_PASSWORD_NEEDED RPC error, directly asking the user to enter the 2FA password, without sending any authorization code.

diff --git a/data/web/corefork.telegram.org/api/bots/webapps.html b/data/web/corefork.telegram.org/api/bots/webapps.html index 05fea3422a..1ccdf132d9 100644 --- a/data/web/corefork.telegram.org/api/bots/webapps.html +++ b/data/web/corefork.telegram.org/api/bots/webapps.html @@ -153,6 +153,43 @@ The webview must be closed after invoking the 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: 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.

+

Bot web apps

+

Schema:

+
inputBotAppID#a920bd7a id:long access_hash:long = InputBotApp;
+inputBotAppShortName#908c0407 bot_id:InputUser short_name:string = InputBotApp;
+
+botAppNotModified#5da674b7 = BotApp;
+botApp#95fcd1d6 flags:# id:long access_hash:long short_name:string title:string description:string photo:Photo document:flags.0?Document hash:long = BotApp;
+
+messages.botApp#eb50adf5 flags:# inactive:flags.0?true request_write_access:flags.1?true app:BotApp = messages.BotApp;
+
+appWebViewResultUrl#3c1b4f0d url:string = AppWebViewResult;
+
+---functions---
+
+messages.getBotApp#34fdc5c3 app:InputBotApp hash:long = messages.BotApp;
+
+messages.requestAppWebView#8c5a3b3c flags:# write_allowed:flags.0?true peer:InputPeer app:InputBotApp start_param:flags.1?string theme_params:flags.2?DataJSON platform:string = AppWebViewResult;
+
+messages.prolongWebView#7ff34309 flags:# silent:flags.5?true peer:InputPeer bot:InputUser query_id:long reply_to_msg_id:flags.0?int top_msg_id:flags.9?int send_as:flags.13?InputPeer = Bool;
+

Another way to open web apps is by using bot web app links ».

+

These links are different from bot attachment menu deep links », because they don't require the user to install an attachment menu, and a single bot can offer multiple web apps, distinguished by their short_name.

+

These links should be handled as follows:

+ +

Finally, open the webview using the url contained in the returned appWebViewResultUrl.

+

Since there is no linked inline query, web_app_data_send events must be ignored.
+The bot can, however, write to the user directly if it already has a chat with the user or if it requested permission via request_write_access and the user granted it with write_allowed.

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.

This JSON object has the the following keys, containing color theme information (hex string, RGB, no alpha) to pass to the web app:

diff --git a/data/web/corefork.telegram.org/api/layers.html b/data/web/corefork.telegram.org/api/layers.html index 7c3d010e55..1349a42baa 100644 --- a/data/web/corefork.telegram.org/api/layers.html +++ b/data/web/corefork.telegram.org/api/layers.html @@ -57,7 +57,7 @@

Schema changes

New Methods
New Constructors
@@ -437,7 +437,7 @@
  • Added channelAdminLogEventActionDeleteTopic -
  • Added channelAdminLogEventActionPinTopic -
  • Added forumTopicDeleted -
  • -
  • Added forumTopic -
  • +
  • Added forumTopic - Represents a forum topic.
  • Added messages.forumTopics -
  • Added messageActionTopicCreate -
  • Added messageActionTopicEdit -
  • @@ -1283,7 +1283,7 @@ Also, discussion group admins can now messages.getAvailableReactions#18dea0ac hash:int = messages.AvailableReactions; messages.setDefaultReaction#d960c4d4 reaction:string = Bool;

    Layer 135

    -

    Anonymous posting in public groups, protected content, device management, login via missed call, mention users in inline buttons even if they don't have a username, logout tokens, improvements to join requests and stickers.

    +

    Anonymous posting in public groups, protected content, device management, login via missed call, mention users in inline buttons even if they don't have a username, future auth tokens, improvements to join requests and stickers.

    Schema changes

    New Methods
    Changed Constructors