Update content of files

This commit is contained in:
GitHub Action 2024-08-08 09:00:26 +00:00
parent 5a77239cb6
commit 05a40c058c
3 changed files with 10 additions and 2 deletions
data/web/corefork.telegram.org/api

View file

@ -49,7 +49,7 @@ An error is characterized by several parameters:</p>
<h4><a class="anchor" href="#error-type" id="error-type" name="error-type"><i class="anchor-icon"></i></a>Error Type</h4>
<p>A string literal in the form of <code>/[A-Z_0-9]+/</code>, which summarizes the problem. For example, <code>AUTH_KEY_UNREGISTERED</code>. This is an optional parameter.</p>
<h4><a class="anchor" href="#error-database" id="error-database" name="error-database"><i class="anchor-icon"></i></a>Error Database</h4>
<p>A full human-readable JSON list of RPC errors that can be returned by all methods in the API can be found <a href="/file/400780400453/1/28JOIN-zhX4.133746.json/0399e2c6585e7b6b70">here »</a>, what follows is a description of its fields: </p>
<p>A full human-readable JSON list of RPC errors that can be returned by all methods in the API can be found <a href="/file/400780400409/2/eYpI8EyTOcE.133746.json/64cdd68f65de0d2dc5">here »</a>, what follows is a description of its fields: </p>
<ul>
<li><code>errors</code> - All error messages and codes for each method (object).<ul>
<li>Keys: Error codes as strings (numeric strings)</li>

View file

@ -65,6 +65,7 @@
<li>Clarified that <a href="/method/updates.getChannelDifference">updates.getChannelDifference</a> does <em>not</em> have to be invoked on startup for all channels, as it will be automatically triggered (only for channels that need catching up) by a set of <a href="/constructor/updateChannelTooLong">updateChannelTooLong</a> updates that will be returned by <a href="/method/updates.getDifference">updates.getDifference</a> (that <em>does</em> need to be called on startup).</li>
<li>Clarified that <a href="/api/updates#subscribing-to-updates-of-channels-supergroups">users should short-poll updates.getChannelDifference for currently opened channels/supergroups (including subscribed ones, max 10 overall) »</a>.</li>
<li>Clarified that <a href="/method/updates.getChannelDifference">updates.getChannelDifference</a> should not be short-polled via <code>timeout</code> by bots, or if the user is currently not viewing the channel/supergroup.</li>
<li>Clarified <a href="/api/updates#subscribing-to-updates">which updates may be accepted from not yet logged sessions »</a>.</li>
</ul>
</li>
</ul>

View file

@ -48,7 +48,14 @@
<h3><a class="anchor" href="#subscribing-to-updates" id="subscribing-to-updates" name="subscribing-to-updates"><i class="anchor-icon"></i></a>Subscribing to Updates</h3>
<p>Update events are sent to an authorized user into the last active connection (except for connections needed for downloading / uploading files).</p>
<p>So to start receiving updates the client needs to init connection and call API method, e.g. to <a href="#fetching-state">fetch current state</a>.</p>
<p>Make sure to <strong>always ignore updates received from unencrypted connections</strong>. </p>
<p>Make sure to <strong>always ignore updates received from unencrypted connections</strong> (i.e. before the handshake is completed). </p>
<p>If the connection is encrypted, but the session isn't logged in yet or was logged out, only the following updates may be handled:</p>
<ul>
<li><a href="/constructor/updateLoginToken">updateLoginToken</a> - For <a href="/api/qr-login">QR code logins</a></li>
<li><a href="/constructor/updateDcOptions">updateDcOptions</a> - Changes in the data center connection options that must be applied</li>
<li><a href="/constructor/updateConfig">updateConfig</a> - The server-side configuration has changed; the client should re-fetch the config using <a href="/method/help.getConfig">help.getConfig</a> and <a href="/method/help.getAppConfig">help.getAppConfig</a>.</li>
<li><a href="/constructor/updateLangPackTooLong">updateLangPackTooLong</a>, <a href="/constructor/updateLangPack">updateLangPack</a> - Localization pack updates</li>
</ul>
<h3><a class="anchor" href="#event-sequences" id="event-sequences" name="event-sequences"><i class="anchor-icon"></i></a>Event sequences</h3>
<p>All events are received from the socket as a sequence of TL-serialized <a href="/type/Updates">Updates</a> objects, which might be optionally gzip-compressed in the same way as <a href="/api/invoking#decompressing-data">responses to queries</a>.</p>
<p>Each <a href="/type/Updates">Updates</a> object may contain single or multiple <a href="/type/Update">Update</a> objects, representing different events happening.</p>