UpdateShortChatMessage#4d6deea5 flags: # out:flags.1? true mentioned:flags.4? true media_unread:flags.5? true silent:flags.13? true id: int from_id: long chat_id: long message: string pts: int pts_count: int date: int fwd_from:flags.2? MessageFwdHeader via_bot_id:flags.11? long reply_to:flags.3? MessageReplyHeader entities:flags.7? Vector ttl_period:flags.25? int = Updates UpdateShortMessage#313bc7f8 flags: # out:flags.1? true mentioned:flags.4? true media_unread:flags.5? true silent:flags.13? true id: int user_id: long message: string pts: int pts_count: int date: int fwd_from:flags.2? MessageFwdHeader via_bot_id:flags.11? long reply_to:flags.3? MessageReplyHeader entities:flags.7? Vector ttl_period:flags.25? int = Updates UpdateShort#78d4dec1 update: Update date: int = Updates It can be seen from the schema below that this type has several constructors. More below » Updates sequenceĪs said earlier, each payload with updates has a TL-type Updates. When a gap in updates sequence occurs, it must be filled via calling one of the API methods. The client must use those attributes values in combination with locally stored state to correctly apply incoming updates. In order to apply all updates in precise order and to guarantee that no update is missed or applied twice there is seq attribute in Updates constructors, and pts (with pts_count) or qts attributes in Update constructors. Event sequencesĪll events are received from the socket as a sequence of TL-serialized Updates objects, which might be optionally gzip-compressed in the same way as responses to queries.Įach Updates object may contain single or multiple Update objects, representing different events happening. So to start receiving updates the client needs to init connection and call API method, e.g. Update events are sent to an authorized user into the last active connection (except for connections needed for downloading / uploading files). To eliminate the need for the client itself to periodically download these events, there is an update delivery mechanism in which the server sends the user notifications over one of its available connections with the client. When a client is being actively used, events will occur that affect the current user and that they must learn about as soon as possible, e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |