diff --git a/data/web/corefork.telegram.org/api/peers.html b/data/web/corefork.telegram.org/api/peers.html index 0a082938ec..e1e865d749 100644 --- a/data/web/corefork.telegram.org/api/peers.html +++ b/data/web/corefork.telegram.org/api/peers.html @@ -46,7 +46,7 @@
Many constructors in the API need to be stored in a local database upon reception and should only ever be updated reactively (passively) when received via updates or by other means (as specified in the documentation), to avoid overloading the server by continuously requesting changes for the same unchanged information.
user, chat, channel constructors and their full counterparts userFull, chatFull, channelFull are especially important, because they contain important information about users, bots, chats and channels (from now on, peers), and most importantly the access_hash
value, required to interact with peers in the API.
This page describes exactly how and when should the local databases of the constructors listed above be refreshed.
+This page describes exactly how and when should the local databases of the constructors listed above be refreshed, and contains a more detailed description of basic peer-related concepts.
diff --git a/data/web/corefork.telegram.org/constructor/channel.html b/data/web/corefork.telegram.org/constructor/channel.html index f9752b4b3b..e394dbdcb4 100644 --- a/data/web/corefork.telegram.org/constructor/channel.html +++ b/data/web/corefork.telegram.org/constructor/channel.html @@ -194,12 +194,12 @@For simplicity, the documentation often uses the term "cache" instead of "database" when referring to the peer database, however note that the peer database is not an ephemeral cache: peer information (or at the very least the id+access hash) must be persisted to a database and never deleted, to avoid losing access to the API, which requires the locally stored access hash to call methods.
min_access_hash
, which is: true
if min
is set AND phone
flag is not set OR phone
flag is set and the associated phone number string is non-empty false
otherwise. access_hash
and min_access_hash
to the local database if: min_access_hash
is false OR min_access_hash
is true AND access_hash
in the local cache OR min_access_hash
is also true min_access_hash
field set to true, the related access_hash
is only suitable to use in inputPeerPhotoFileLocation
», to directly download the profile pictures of users, everywhere else a inputPeer*FromMessage
constructor will have to be generated as specified here ». 0
instead of the min access hash.min_access_hash
, which is: true
if min
is set AND phone
flag is not set OR phone
flag is set and the associated phone number string is non-empty false
otherwise. access_hash
and min_access_hash
to the local database if: min_access_hash
is false OR min_access_hash
is true AND access_hash
in the local cache OR min_access_hash
is also true min_access_hash
field set to true, the related access_hash
is only suitable to use in inputPeerPhotoFileLocation
», to directly download the profile pictures of users, everywhere else a inputPeer*FromMessage
constructor will have to be generated as specified here ». 0
instead of the min access hash.Represents a channel
@@ -55,9 +55,7 @@inputChannelEmpty#ee8c1e86 = InputChannel;
-inputChannel#f35aec28 channel_id:long access_hash:long = InputChannel;
-inputChannelFromMessage#5b934f9d peer:InputPeer msg_id:int channel_id:long = InputChannel;
+