Update content of files

This commit is contained in:
GitHub Action 2024-08-05 11:39:23 +00:00
parent 4b26b20925
commit 2641375509

View file

@ -208,13 +208,12 @@ As specified in the constructor docs, some of the fields must not be overwritten
<p>Example implementation: <a href="https://github.com/tdlib/td/">tdlib</a>.</p>
<p>The full info database contains info from the <a href="/constructor/userFull">userFull</a>, <a href="/constructor/chatFull">chatFull</a> and <a href="/constructor/channelFull">channelFull</a> constructors. </p>
<p>To populate the full info database for a peer, invoke <a href="/method/users.getFullUser">users.getFullUser</a>, <a href="/method/messages.getFullChat">messages.getFullChat</a>, <a href="/method/channels.getFullChannel">channels.getFullChannel</a>, all requiring the previously cached <a href="#access-hash">access_hash »</a>. </p>
<p>Populate the full info database only when the client needs some data from a full constructor, <strong>and</strong> there is no entry already in the database. </p>
<p>Invalidate only <a href="/constructor/userFull">userFull</a> and <a href="/constructor/channelFull">channelFull</a> entries 60 seconds after they are stored.</p>
<p>Full peer info stored to the database must be refreshed <strong>only in the following conditions</strong> (i.e. <strong>do not</strong> refresh user info when opening the profile page, or every time the entry is accessed, or when the TTL expires): </p>
<p>Refresh the full info database <strong>only</strong> when the client needs some data from a full constructor, <strong>and</strong> there is no entry already in the database, or the entries were invalidated by the TTL (i.e. <strong>do not</strong> refresh user info when opening the profile page, or every time the entry is accessed, or when the TTL expires and the data isn't immediately needed for some operation). </p>
<p>Immediately invalidate the related full peer database entry if:</p>
<ul>
<li>No entry is present in the full peer database or it was invalidated by the TTL, but some information from a full peer entry was requested by the user or some functionality of the client. </li>
<li>Some event (specified <a href="#peer-info-database">here »</a>) changes the value of a specific subset of fields of an entry in the (non-full!) <a href="#peer-info-database">peer info database »</a>.<br>
The relative full info entry should only be refreshed when some specific fields of the locally cached <a href="/constructor/user">user</a>/<a href="/constructor/channel">channel</a> are changed, see the documentation in the constructor pages for the full list. </li>
The relative full info entry should only be refreshed when some specific fields of the locally cached <a href="/constructor/user">user</a>/<a href="/constructor/channel">channel</a> are changed, see the documentation in the <a href="/constructor/user">user</a> and <a href="/constructor/channel">channel</a> constructor pages for the full list. </li>
<li>When receiving an <a href="/constructor/updateUser">updateUser</a>, <a href="/constructor/updateChat">updateChat</a>, <a href="/constructor/updateChannel">updateChannel</a>, and some other updates, as specified <a href="/type/Update">here »</a></li>
<li>After invoking <a href="/method/bots.setBotInfo">bots.setBotInfo</a> after changing <code>about</code> or <code>description</code> (but <strong>not</strong> <code>name</code>), for the bot whose info we changed.</li>
<li>After invoking <a href="/method/messages.setChatWallPaper">messages.setChatWallPaper</a> to <em>remove</em> the wallpaper and receiving an error, for the peer whose wallpapers we tried to change, to fetch the correct and updated wallpaper settings. </li>
@ -223,7 +222,10 @@ The relative full info entry should only be refreshed when some specific fields
<li>If <a href="/constructor/chat">chat</a>.<code>photo</code> is not equal to <a href="/constructor/chatFull">chatFull</a>.<code>chat_photo</code></li>
<li>The <a href="/constructor/channelFull">channelFull</a>.<code>linked_chat_id</code> of channnel/supergroup A is updated to point to channel/supergroup B, but the <a href="/constructor/channelFull">channelFull</a>.<code>linked_chat_id</code> of channel/supergroup B does not point to channel/supergroup A, refresh the <a href="/constructor/channelFull">channelFull</a> of channel/supergroup B.</li>
<li>Info about a bot that is a participant to the channel/supergroup is fetched by other means, but the bot is not contained in <a href="/constructor/channelFull">channelFull</a>.<code>bot_info</code>. </li>
<li>If <a href="/constructor/channelFull">channelFull</a>.<code>participants_count</code> is less than <a href="/constructor/channelFull">channelFull</a>.<code>admins_count</code> after a local update of the admin list by other means.</li>
<li>If the currently logged in user's <a href="/constructor/inputPrivacyKeyStatusTimestamp">inputPrivacyKeyStatusTimestamp</a> <a href="/api/privacy">privacy setting »</a> was changed, invalidate the entire <a href="/constructor/userFull">userFull</a> cache for all users. </li>
<li>After receiving an error different from <code>USER_NOT_PARTICIPANT</code> when calling <a href="/method/channels.leaveChannel">channels.leaveChannel</a></li>
<li>If the profile picture is updated or removed</li>
<li>After successfully invoking any of the following methods, for the bot in question:<ul>
<li><a href="/method/bots.deletePreviewMedia">bots.deletePreviewMedia</a></li>
</ul>
@ -237,8 +239,9 @@ The relative full info entry should only be refreshed when some specific fields
<li><a href="/method/channels.editCreator">channels.editCreator</a> - For the channel/supergroup</li>
</ul>
</li>
</ul>
<p><strong>Do not</strong> refresh full peer information in any other case, to avoid overloading the server by continuously requesting changes for the same unchanged information.</p></div>
<li>When receiving a <code>CHANNEL_PRIVATE</code> or <code>CHANNEL_PUBLIC_GROUP_NA</code> RPC error.</li>
<li>When a channel is made private/public (where previously it was public/private. public=has at least one username, private=has no usernames).</li>
</ul></div>
</div>