diff --git a/data/web/corefork.telegram.org/api/folders.html b/data/web/corefork.telegram.org/api/folders.html index 60310133ba..8a0a43b5e9 100644 --- a/data/web/corefork.telegram.org/api/folders.html +++ b/data/web/corefork.telegram.org/api/folders.html @@ -82,7 +82,7 @@ Folders can also have up to dialogs_folder_pinned_limit_* pinned ch

Clients can receive updateDialogFilter, updateDialogFilterOrder updates with new filter information, generated by other clients when modifying folder info.
Clients can also receive updateDialogFilters, in which case folder info should be refetched manually using messages.getDialogFilters.

Peer folders

-

The API also has another method for identifying groups of peers, typically used only by archived chats.

+

The API also has another method for identifying groups of peers, used by archived chats.

Schema:

inputDialogPeer#fcaafeb7 peer:InputPeer = InputDialogPeer;
 inputDialogPeerFolder#64600527 folder_id:int = InputDialogPeer;
diff --git a/data/web/corefork.telegram.org/api/updates.html b/data/web/corefork.telegram.org/api/updates.html
index 2b066be8b1..81b6a6bcc9 100644
--- a/data/web/corefork.telegram.org/api/updates.html
+++ b/data/web/corefork.telegram.org/api/updates.html
@@ -64,15 +64,15 @@
 updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;

updatesTooLong indicates that there are too many events pending to be pushed to the client, so one needs to fetch them manually.

Events inside updateShort constructors, normally, have lower priority and are broadcast to a large number of users, i.e. one of the chat participants started entering text in a big conversation (updateChatUserTyping).

-

The updateShortMessage, updateShortSentMessage and updateShortChatMessage constructors are redundant but help significantly reduce the transmitted message size for 90% of the updates. They should be transformed to updateShort upon receiving.

-

Two remaining constructors updates and updatesCombined are part of the Updates sequence. Both of them have seq attribute, which indicates the remote Updates state after the generation of the Updates, and seq_start indicates the remote Updates state after the first of the Updates in the packet is generated. For updates, seq_start attribute is omitted, because it is assumed that it is always equal to seq.

+

The updateShortMessage, updateShortSentMessage and updateShortChatMessage constructors are redundant but help significantly reduce the transmitted message size for 90% of the updates. They should be transformed to updateShort upon receival.

+

Two remaining constructors updates and updatesCombined are part of the Updates sequence. Both of them have the seq attribute, which indicates the remote Updates state after the generation of the Updates, and seq_start indicates the remote Updates state after the first of the Updates in the packet is generated. For updates, seq_start attribute is omitted, because it is assumed that it is always equal to seq.

Message-related event sequences

-

Each event related to a message box (message created, message edited, message deleted, etc) is identified by a unique autoincremented pts, or qts in case of secret chat updates, certain bot updates, etc.

+

Each event related to a message box (message created, message edited, message deleted, etc) is identified by a unique autoincremented pts, or qts in case of secret chat updates, certain bot updates, etc.

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).

-

Update object may contain info about multiple events (for example, updateDeleteMessages). -That's why all single updates might have pts_count parameter indicating the number of events contained in the received update (with some exceptions, in this case, the pts_count is considered to be 0).

-

Each channel and supergroup has its message box and its event sequence as a result; private chats and basic groups of one user have another common event sequence. +

The Update object may contain info about multiple events (for example, updateDeleteMessages). +That's why all single updates might have pts_count parameter indicating the number of events contained in the received update (with some exceptions, in this case, the pts_count is considered to be 0).

+

Each channel and supergroup has its message box and its event sequence as a result; private chats and basic groups of one user have another common event sequence.
Secret chats, certain bot events and other kinds of updates have yet another common secondary event sequence.

To recap, the client has to take care of the integrity of the following sequences to properly handle updates: