From af5ac7da2a8aa577b504520b1a734f338e5e4980 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 24 Jul 2024 15:26:43 +0000 Subject: [PATCH] Update content of files --- data/web/corefork.telegram.org/api/peers.html | 39 +++++++++++++++---- .../constructor/channel.html | 2 +- .../constructor/user.html | 2 +- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/data/web/corefork.telegram.org/api/peers.html b/data/web/corefork.telegram.org/api/peers.html index e478a57fc8..011f8ea23c 100644 --- a/data/web/corefork.telegram.org/api/peers.html +++ b/data/web/corefork.telegram.org/api/peers.html @@ -88,14 +88,39 @@

The peer info database needs to be updated every time a new constructor of type user, chat and channel (and their forbidden counterparts, used for peers that the user can't access, but can view basic info about) is received.

These constructors are received when interacting with the API (i.e. in common chats, through the search function, username resolution, temporary profile links, and so on...).

Unless specified otherwise (see the constructor pages for the special cases), when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).

-

Information about already cached peers must be refreshed in certain conditions using the bulked users.getUsers, messages.getChats, channels.getChannels methods, all requiring the previously cached access_hash (read on for more info).

-

Peer info must be refreshed only in the following conditions (i.e. do not refresh user info when opening the profile page, and so on...):

+

Some updates should trigger an update of a small subset of the info contained in the peer database:

+

Information about already cached peers must be refreshed manually in certain conditions using the bulked users.getUsers, messages.getChats, channels.getChannels methods, all requiring the previously cached access_hash (read on for more info).

+

Peer info must be manually refreshed with a method call to the above methods only in the following conditions (i.e. do not refresh user info when opening the profile page, and so on...):

+

Do not refresh peer information in any other case, to avoid overloading the server by continuously requesting changes for the same unchanged information.

The peer info database contains the following information:

diff --git a/data/web/corefork.telegram.org/constructor/channel.html b/data/web/corefork.telegram.org/constructor/channel.html index e394dbdcb4..4c66e69269 100644 --- a/data/web/corefork.telegram.org/constructor/channel.html +++ b/data/web/corefork.telegram.org/constructor/channel.html @@ -209,7 +209,7 @@ username flags.6?string -Username +Main active username. photo diff --git a/data/web/corefork.telegram.org/constructor/user.html b/data/web/corefork.telegram.org/constructor/user.html index b62fac408b..f1ba36eb55 100644 --- a/data/web/corefork.telegram.org/constructor/user.html +++ b/data/web/corefork.telegram.org/constructor/user.html @@ -221,7 +221,7 @@ username flags.3?string -Username.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
   - The min flag of the locally cached user entry is set. +Main active username.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
   - The min flag of the locally cached user entry is set. phone