Update content of files

This commit is contained in:
GitHub Action 2021-10-19 17:06:31 +00:00
parent 1dcf3429bf
commit 0838e98524
7 changed files with 29 additions and 24 deletions

View file

@ -41,13 +41,16 @@
<div id="dev_page_content"><!-- scroll_nav -->
<h3><a class="anchor" href="#channels-chats--supergroups" id="channels-chats--supergroups" name="channels-chats--supergroups"><i class="anchor-icon"></i></a>Channels, chats &amp; supergroups</h3>
<p><a href="https://telegram.org/tour/channels">Channels</a> are a tool for broadcasting your messages to large audiences. They can have an unlimited number of subscribers, they can be public with a permanent URL and each post in a channel has its own view counter.
Technically, they are represented by <a href="/constructor/channel">channel</a> constructors.</p>
<p><a href="https://telegram.org/tour/groups">Supergroups</a> are a powerful tool for building communities and can support up to 200,000 members each.
Technically, supergroups are actually channels: they are represented by <a href="/constructor/channel">channel</a> constructors, with the <code>megagroup</code> flag set to true.</p>
<p>Channels and supergroup can be created using the <a href="/method/channels.createChannel">channels.createChannel</a> method, by setting the appropriate <code>broadcast</code> or <code>megagroup</code> flags.
Supergroups can also be assigned a <code>geo_point</code> to become <a href="https://telegram.org/blog/contacts-local-groups">geochats</a>.</p>
<h3><a class="anchor" href="#channels-chats-supergroups--gigagroups" id="channels-chats-supergroups--gigagroups" name="channels-chats-supergroups--gigagroups"><i class="anchor-icon"></i></a>Channels, chats, supergroups &amp; gigagroups</h3>
<p><a href="https://telegram.org/tour/channels">Channels</a> are a tool for broadcasting your messages to large audiences. They can have an unlimited number of subscribers, they can be public with a permanent URL and each post in a channel has its own view counter.<br>
Technically, they are represented by <a href="/constructor/channel">channel</a> constructors. </p>
<p><a href="https://telegram.org/tour/groups">Supergroups</a> are a powerful tool for building communities and can support up to 200,000 members each.<br>
Technically, supergroups are actually channels: they are represented by <a href="/constructor/channel">channel</a> constructors, with the <code>megagroup</code> flag set to true. </p>
<p>Gigagroups are something inbetween a channel and a supergroup.<br>
An admin, <a href="/api/config#channel-suggestions">when prompted by the API using suggestions »</a>, can convert a megagroup into a gigagroup using <a href="/method/channels.convertToGigagroup">channels.convertToGigagroup</a> (one way only). After that, only admins will be able to write in the group (like when <a href="#rights"><code>send_messages</code> rights are disabled for all group participants by default</a>), but the participant limit is removed and the group can become much bigger than a supergroup (e.g. &gt;200,000 currently).<br>
Also, one can't invite people into gigagroups and participants of voice chats in gigagroups are muted by default. </p>
<p>Channels and supergroup can be created using the <a href="/method/channels.createChannel">channels.createChannel</a> method, by setting the appropriate <code>broadcast</code> or <code>megagroup</code> flags.<br>
Supergroups can also be assigned a <code>geo_point</code> to become <a href="https://telegram.org/blog/contacts-local-groups">geochats</a>. </p>
<p>In previous versions of telegram, only normal groups (represented by <a href="/constructor/chat">chat</a> constructors) could be created using <a href="/method/messages.createChat">messages.createChat</a>: these groups have fewer features, and can only have 200 members at max.</p>
<h3><a class="anchor" href="#migration" id="migration" name="migration"><i class="anchor-icon"></i></a>Migration</h3>
<p>To upgrade a legacy group to a supergroup, <a href="/method/messages.migrateChat">messages.migrateChat</a> can be used.

View file

@ -76,6 +76,8 @@ While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specif
<li><code>emojies_sounds</code> - A map of soundbites to be played when the user clicks on the specified <a href="/api/animated-emojis">animated emoji</a>; the <a href="/api/file_reference">file reference field</a> should be base64-decoded before <a href="/api/files">downloading the file</a> (map of <a href="/api/files">file IDs</a>, with emoji string keys)</li>
<li><code>gif_search_branding</code> - Specifies the name of the service providing GIF search through <a href="#mtproto-configuration">gif_search_username</a> (string)</li>
<li><code>gif_search_emojies</code> - Specifies a list of emojies that should be suggested as search term in a bar above the GIF search box (array of string emojis)</li>
<li><code>stickers_emoji_suggest_only_api</code> - Specifies that the app should not display local sticker suggestions for emojis at all and just use the result of <a href="/method/messages.getStickers">messages.getStickers</a> (bool)</li>
<li><code>stickers_emoji_cache_time</code> - Specifies the validity period of the local cache of <a href="/method/messages.getStickers">messages.getStickers</a>, also relevant when generating the <a href="/api/offsets#hash-generation">pagination hash</a> when invoking the method. (int)</li>
<li><code>qr_login_camera</code> - Whether the Settings-&gt;Devices menu should show an option to scan a <a href="/api/qr-login">QR login code</a> (boolean)</li>
<li><code>qr_login_code</code> - Whether the login screen should show a <a href="/api/qr-login">QR code login option</a>, possibly as default login method (string, "disabled", "primary" or "secondary")</li>
<li><code>dialog_filters_enabled</code> - Whether clients should show an option for managing <a href="/api/folders">dialog filters AKA folders</a> (boolean)</li>
@ -188,7 +190,6 @@ While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specif
],
"stickers_emoji_suggest_only_api": false,
"stickers_emoji_cache_time": 86400,
"groupcall_video_participants_max": 1000,
"qr_login_camera": false,
"qr_login_code": "disabled",
"dialog_filters_enabled": true,

View file

@ -1335,7 +1335,7 @@ Notice that all <code>PINNED_*</code> <a href="https://core.telegram.org/api/pus
<li>Added <a href="/constructor/baseThemeTinted">baseThemeTinted</a> - Tinted theme</li>
<li>Added <a href="/constructor/baseThemeArctic">baseThemeArctic</a> - Arctic theme</li>
<li>Added <a href="/constructor/inputWallPaperNoFile">inputWallPaperNoFile</a> - Wallpaper with no file access hash, used for example when deleting (<code>unsave=true</code>) wallpapers using <a href="/method/account.saveWallPaper">account.saveWallPaper</a>, specifying just the wallpaper ID.</li>
<li>Added <a href="/constructor/wallPaperNoFile">wallPaperNoFile</a> - No file wallpaper</li>
<li>Added <a href="/constructor/wallPaperNoFile">wallPaperNoFile</a> - Wallpaper with no file access hash, used for example when deleting (<code>unsave=true</code>) wallpapers using <a href="/method/account.saveWallPaper">account.saveWallPaper</a>, specifying just the wallpaper ID. </li>
<li>Added <a href="/constructor/inputThemeSettings">inputThemeSettings</a> - Theme settings</li>
<li>Added <a href="/constructor/themeSettings">themeSettings</a> - Theme settings</li>
<li>Added <a href="/constructor/webPageAttributeTheme">webPageAttributeTheme</a> - Page theme</li>

View file

@ -64,18 +64,18 @@
<p>The <a href="/constructor/updateShortMessage">updateShortMessage</a>, <a href="/constructor/updateShortMessage">updateShortSentMessage</a> and <a href="/constructor/updateShortChatMessage">updateShortChatMessage</a> constructors are redundant but help significantly reduce the transmitted message size for 90% of the updates. They should be transformed to <a href="/constructor/updateShort">updateShort</a> upon receiving.</p>
<p>Two remaining constructors <a href="/constructor/updates">updates</a> and <a href="/constructor/updatesCombined">updatesCombined</a> are part of the Updates sequence. Both of them have <code>seq</code> attribute, which indicates the remote Updates state after the generation of the Updates, and <code>seq_start</code> indicates the remote Updates state after the <em>first</em> of the Updates in the packet is generated. For <a href="/constructor/updates">updates</a>, <code>seq_start</code> attribute is omitted, because it is assumed that it is always equal to <code>seq</code>.</p>
<h3><a class="anchor" href="#message-related-event-sequences" id="message-related-event-sequences" name="message-related-event-sequences"><i class="anchor-icon"></i></a>Message-related event sequences</h3>
<p>Each <em>event</em> related to a message box (message created, message edited, message deleted, etc) is identified by a unique autoincremented <em>pts</em> (or <em>qts</em> in case of secret chats).</p>
<p>Each <em>event</em> related to a message box (message created, message edited, message deleted, etc) is identified by a unique autoincremented <em>pts</em>, or <em>qts</em> in case of secret chat updates, certain bot updates, etc.</p>
<p>Each message box can be considered as some server-side DB table that stores messages and events associated with them.
All boxes are completely independent, and each pts sequence is tied to just one box (see below).</p>
<p><a href="/type/Update">Update</a> object may contain info about <em>multiple events</em> (for example, <a href="/constructor/updateDeleteMessages">updateDeleteMessages</a>).
That's why all single updates might have <em>pts_count</em> parameter indicating the <em>number of events</em> contained in the received <em>update</em> (with some exceptions, in this case, the <em>pts_count</em> is considered to be <code>0</code>).</p>
<p>Each <a href="/api/channel">channel and supergroup</a> has its message box and <em>its event sequence</em> as a result; private chats and legacy groups of one user have another <em>common event sequence</em>.
User's Secret chats have yet another <em>common secret event sequence</em>.</p>
Secret chats, certain bot events and other kinds of updates have yet another <em>common secondary event sequence</em>.</p>
<p>To recap, the client has to take care of the integrity of the following sequences to properly handle updates:</p>
<ul>
<li>Updates sequence (seq)<ul>
<li>Common message box sequence (pts)</li>
<li>Secret message box sequence (qts)</li>
<li>Secondary event sequence (qts)</li>
<li>Channel message box sequence 1 (pts)</li>
<li>Channel message box sequence 2 (pts)</li>
<li>Channel message box sequence 3 (pts)</li>
@ -88,7 +88,7 @@ User's Secret chats have yet another <em>common secret event sequence</em>.</p>
When the user logs in for the first time, call to <a href="/method/updates.getState">updates.getState</a> has to be made to store the latest update state (which will not be the absolute initial state, just the latest state at the current time).
The common update state can also be fetched from <a href="/constructor/updates.differenceTooLong">updates.differenceTooLong</a>.</p>
<p>The <em>channel update state</em> is represented simply by the <em>pts</em> of the event sequence: when first logging in, the initial channel state can be obtained from the <a href="/constructor/dialog">dialog</a> constructor when fetching dialogs, from <a href="/constructor/channelFull">the full channel info</a>, or it can be received <a href="https://core.telegram.org/constructor/updateChannelTooLong">as an updateChannelTooLong update</a>.</p>
<p>The <em>secret chat update state</em> is represented by the <em>qts</em> of the secret event sequence, it is contained in the <a href="/type/updates.State">updates.State</a> of the <em>common update state</em>.</p>
<p>The <em>secondary update state</em> is represented by the <em>qts</em> of the secret event sequence, it is contained in the <a href="/type/updates.State">updates.State</a> of the <em>common update state</em>.</p>
<p>The <em>Updates sequence state</em> is represented by the <em>date</em> and <em>seq</em> of the <em>Updates sequence</em>, it is contained in the <a href="/type/updates.State">updates.State</a> of the <em>common</em> update state.</p>
<h3><a class="anchor" href="#update-handling" id="update-handling" name="update-handling"><i class="anchor-icon"></i></a>Update handling</h3>
<p>Update handling in Telegram clients consists of receiving events, making sure there were no gaps and no events were missed based on the locally stored state of the correspondent event sequence, and then updating the locally stored state based on the parameters received.</p>
@ -114,8 +114,8 @@ Since <code>local_pts + pts_count === pts</code>, the total number of events sin
Since <code>local_pts + pts_count &gt; pts</code> (<code>133 &gt; 132</code>), the update is skipped because we've already handled this update (in fact, our current <code>local_pts</code> was set by this same update, and it was resent twice due to network issues or other issues).</p>
<p>Now let's assume an <a href="/constructor/updateDeleteChannelMessages">updateDeleteChannelMessages</a> from channel <code>123456789</code> is received with <code>pts = 140</code> and <code>pts_count=5</code>.
Since <code>local_pts + pts_count &lt; pts</code> (<code>137 &lt; 140</code>), this means that updates were missed, and the gap must be recovered.</p>
<h5><a class="anchor" href="#secret-chats" id="secret-chats" name="secret-chats"><i class="anchor-icon"></i></a>Secret chats</h5>
<p>The whole process is very similar for secret chats, but there is <code>qts</code> instead of <code>pts</code>, and events are never grouped, so it's assumed that <code>qts_count</code> is always equal to 1.</p>
<h5><a class="anchor" href="#secret-chats--bots" id="secret-chats--bots" name="secret-chats--bots"><i class="anchor-icon"></i></a>Secret chats &amp; bots</h5>
<p>The whole process is very similar for secret chats and certain bot updates, but there is <code>qts</code> instead of <code>pts</code>, and events are never grouped, so it's assumed that <code>qts_count</code> is always equal to 1.</p>
<h4><a class="anchor" href="#seq-checking-and-applying" id="seq-checking-and-applying" name="seq-checking-and-applying"><i class="anchor-icon"></i></a><code>seq</code>: checking and applying</h4>
<p>On top level when handling received <a href="/constructor/updates">updates</a> and <a href="/constructor/updatesCombined">updatesCombined</a> there are three possible cases:
If <code>local_seq + 1 === seq_start</code>, the updates can be applied.

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>inputBotInlineMessageID</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Represents a sent inline message from the perspective of a bot">
<meta property="description" content="Represents a sent inline message from the perspective of a bot (legacy constructor)">
<meta property="og:title" content="inputBotInlineMessageID">
<meta property="og:image" content="">
<meta property="og:description" content="Represents a sent inline message from the perspective of a bot">
<meta property="og:description" content="Represents a sent inline message from the perspective of a bot (legacy constructor)">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -39,7 +39,7 @@
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/inputBotInlineMessageID" >inputBotInlineMessageID</a></li></ul></div>
<h1 id="dev_page_title">inputBotInlineMessageID</h1>
<div id="dev_page_content"><p>Represents a sent inline message from the perspective of a bot</p>
<div id="dev_page_content"><p>Represents a sent inline message from the perspective of a bot (legacy constructor)</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -71,7 +71,7 @@
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>ID of message</td>
<td>ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID.</td>
</tr>
<tr>
<td><strong>access_hash</strong></td>

View file

@ -4,10 +4,10 @@
<meta charset="utf-8">
<title>wallPaperNoFile</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="No file wallpaper">
<meta property="description" content="Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using account.saveWallPaper, specifying just the wallpaper ID. Also used for some default wallpapers which contain only colours.">
<meta property="og:title" content="wallPaperNoFile">
<meta property="og:image" content="">
<meta property="og:description" content="No file wallpaper">
<meta property="og:description" content="Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using account.saveWallPaper, specifying just the wallpaper ID. Also used for some default wallpapers which contain only colours.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
@ -39,7 +39,8 @@
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/schema" >TL-schema</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/constructor/wallPaperNoFile" >wallPaperNoFile</a></li></ul></div>
<h1 id="dev_page_title">wallPaperNoFile</h1>
<div id="dev_page_content"><p>No file wallpaper</p>
<div id="dev_page_content"><p>Wallpaper with no file access hash, used for example when deleting (<code>unsave=true</code>) wallpapers using <a href="/method/account.saveWallPaper">account.saveWallPaper</a>, specifying just the wallpaper ID.<br>
Also used for some default wallpapers which contain only colours.</p>
<p><div class="clearfix">
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
<li class="dropdown">
@ -66,7 +67,7 @@
<tr>
<td><strong>id</strong></td>
<td style="text-align: center;"><a href="/type/long">long</a></td>
<td>Wallpaper with no file access hash, used for example when deleting (<code>unsave=true</code>) wallpapers using <a href="/method/account.saveWallPaper">account.saveWallPaper</a>, specifying just the wallpaper ID.</td>
<td>Wallpaper ID</td>
</tr>
<tr>
<td><strong>flags</strong></td>

View file

@ -73,7 +73,7 @@
<tr>
<td><strong>legacy_revoke_permanent</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/constructor/true">true</a></td>
<td> </td>
<td>Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients.</td>
</tr>
<tr>
<td><strong>peer</strong></td>