Update

Object contains info on events occurred.

updateNewMessage#13abdb3 message:Message pts:int = Update;
updateMessageID#4e90bfd6 id:int random_id:long = Update;
updateReadMessages#c6649e31 messages:Vector<int> pts:int = Update;
updateDeleteMessages#a92bfe26 messages:Vector<int> pts:int = Update;
updateUserTyping#5c486927 user_id:int action:SendMessageAction = Update;
updateChatUserTyping#9a65ea1f chat_id:int user_id:int action:SendMessageAction = Update;
updateChatParticipants#7761198 participants:ChatParticipants = Update;
updateUserStatus#1bfbd823 user_id:int status:UserStatus = Update;
updateUserName#a7332b73 user_id:int first_name:string last_name:string username:string = Update;
updateUserPhoto#95313b0c user_id:int date:int photo:UserProfilePhoto previous:Bool = Update;
updateContactRegistered#2575bbb9 user_id:int date:int = Update;
updateContactLink#51a48a9a user_id:int my_link:contacts.MyLink foreign_link:contacts.ForeignLink = Update;
updateNewAuthorization#8f06529a auth_key_id:long date:int device:string location:string = Update;
updateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update;
updateEncryptedChatTyping#1710f156 chat_id:int = Update;
updateEncryption#b4a2e88d chat:EncryptedChat date:int = Update;
updateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update;
updateChatParticipantAdd#3a0eeb22 chat_id:int user_id:int inviter_id:int version:int = Update;
updateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update;
updateDcOptions#8e5e9873 dc_options:Vector<DcOption> = Update;
updateUserBlocked#80ece81a user_id:int blocked:Bool = Update;
updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings = Update;
updateServiceNotification#382dd3e4 type:string message:string media:MessageMedia popup:Bool = Update;
updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
updateUserPhone#12b9417b user_id:int phone:string = Update;

Constructors

Constructor Description
updateNewMessage New message in a private chat or in a basic group.
updateMessageID Sent message with random_id client identifier was assigned an identifier.
updateDeleteMessages Messages were deleted.
updateUserTyping The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing
updateChatUserTyping The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing
updateChatParticipants Composition of chat participants changed.
updateUserStatus Contact status update.
updateUserName Changes the user's first name, last name and username.
updateNewAuthorization A new session logged into the current user's account through an unknown device.
updateNewEncryptedMessage New encrypted message.
updateEncryptedChatTyping Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.
updateEncryption Change of state in an encrypted chat.
updateEncryptedMessagesRead Communication history in an encrypted chat was marked as read.
updateChatParticipantAdd New group member.
updateChatParticipantDelete A member has left the group.
updateDcOptions Changes in the data center configuration options.
updateNotifySettings Changes in notification settings.
updateServiceNotification A service message for the user.

The app must show the message to the user upon receiving this update. In case the popup parameter was passed, the text message must be displayed in a popup alert immediately upon receipt. It is recommended to handle the text as you would an ordinary message in terms of highlighting links, etc. The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).
updatePrivacy Privacy rules were changed
updateUserPhone A user's phone number was changed
updateReadHistoryInbox Incoming messages were read
updateReadHistoryOutbox Outgoing messages were read
updateWebPage An instant view webpage preview was generated
updateReadMessagesContents Contents of messages in the common message box were read
updateChannelTooLong There are new updates in the specified channel, the client must fetch them.
If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.
updateChannel Channel/supergroup (channel and/or channelFull) information was updated.

This update can only be received through getDifference or in updates/updatesCombined constructors, so it will always come bundled with the updated channel, that should be applied as usual », without re-fetching the info manually.

However, full peer information will not come bundled in updates, so the full peer cache (channelFull) must be invalidated for channel_id when receiving this update.
updateNewChannelMessage A new message was sent in a channel/supergroup
updateReadChannelInbox Incoming messages in a channel/supergroup were read
updateDeleteChannelMessages Some messages in a supergroup/channel were deleted
updateChannelMessageViews The view counter of a message in a channel has changed
updateChatParticipantAdmin Admin permissions of a user in a basic group were changed
updateNewStickerSet A new stickerset was installed
updateStickerSetsOrder The order of stickersets was changed
updateStickerSets Installed stickersets have changed, the client should refetch them as described in the docs.
updateSavedGifs The saved gif list has changed, the client should refetch it using messages.getSavedGifs
updateBotInlineQuery An incoming inline query
updateBotInlineSend The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
updateEditChannelMessage A message was edited in a channel/supergroup
updateBotCallbackQuery A callback button was pressed, and the button data was sent to the bot that created the button
updateEditMessage A message was edited
updateInlineBotCallbackQuery This notification is received by bots when a button is pressed
updateReadChannelOutbox Outgoing messages in a channel/supergroup were read
updateDraftMessage Notifies a change of a message draft.
updateReadFeaturedStickers Some featured stickers were marked as read
updateRecentStickers The recent sticker list was updated
updateConfig The server-side configuration has changed; the client should re-fetch the config using help.getConfig and help.getAppConfig.
updatePtsChanged Common message box sequence PTS has changed, state has to be refetched using updates.getState
updateChannelWebPage A webpage preview of a link in a channel/supergroup message was generated
updateDialogPinned A dialog was pinned/unpinned
updatePinnedDialogs Pinned dialogs were updated
updateBotWebhookJSON A new incoming event; for bots only
updateBotWebhookJSONQuery A new incoming query; for bots only
updateBotShippingQuery This object contains information about an incoming shipping query.
updateBotPrecheckoutQuery This object contains information about an incoming pre-checkout query.
updatePhoneCall An incoming phone call
updateLangPackTooLong A language pack has changed, the client should manually fetch the changed strings using langpack.getDifference
updateLangPack Language pack updated
updateFavedStickers The list of favorited stickers was changed, the client should call messages.getFavedStickers to refetch the new list
updateChannelReadMessagesContents The specified channel/supergroup messages were read
updateContactsReset All contacts were deleted
updateChannelAvailableMessages The history of a channel/supergroup was hidden.
updateDialogUnreadMark The manual unread mark of a chat was changed
updateMessagePoll The results of a poll have changed
updateChatDefaultBannedRights Default banned rights in a normal chat were updated
updateFolderPeers The peer list of a peer folder was updated
updatePeerSettings Settings of a certain peer have changed
updatePeerLocated List of peers near you was updated
updateNewScheduledMessage A message was added to the schedule queue of a chat
updateDeleteScheduledMessages Some scheduled messages were deleted from the schedule queue of a chat
updateTheme A cloud theme was updated
updateGeoLiveViewed Live geoposition message was viewed
updateLoginToken A login token (for login via QR code) was accepted.
updateMessagePollVote A specific peer has voted in a poll
updateDialogFilter A new folder was added
updateDialogFilterOrder New folder order
updateDialogFilters Clients should update folder info
updatePhoneCallSignalingData Incoming phone call signaling payload
updateChannelMessageForwards The forward counter of a message in a channel has changed
updateReadChannelDiscussionInbox Incoming comments in a discussion thread were marked as read
updateReadChannelDiscussionOutbox Outgoing comments in a discussion thread were marked as read
updatePeerBlocked We blocked a peer, see here » for more info on blocklists.
updateChannelUserTyping A user is typing in a supergroup, channel or message thread
updatePinnedMessages Some messages were pinned in a chat
updatePinnedChannelMessages Messages were pinned/unpinned in a channel/supergroup
updateChat Chat (chat and/or chatFull) information was updated.

This update can only be received through getDifference or in updates/updatesCombined constructors, so it will always come bundled with the updated chat, that should be applied as usual », without re-fetching the info manually.

However, full peer information will not come bundled in updates, so the full peer cache (chatFull) must be invalidated for chat_id when receiving this update.
updateGroupCallParticipants The participant list of a certain group call has changed
updateGroupCall A new groupcall was started
updatePeerHistoryTTL The Time-To-Live for messages sent by the current user in a specific chat has changed
updateChatParticipant A user has joined or left a specific chat
updateChannelParticipant A participant has left, joined, was banned or admined in a channel or supergroup.
updateBotStopped A bot was stopped or re-started.
updateGroupCallConnection New WebRTC parameters
updateBotCommands The command set of a certain bot in a certain chat has changed.
updatePendingJoinRequests Someone has requested to join a chat or channel
updateBotChatInviteRequester Someone has requested to join a chat or channel (bots only, users will receive an updatePendingJoinRequests, instead)
updateMessageReactions New message reactions » are available
updateAttachMenuBots The list of installed attachment menu entries » has changed, use messages.getAttachMenuBots to fetch the updated list.
updateWebViewResultSent Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using messages.sendWebViewResultMessage
updateBotMenuButton The menu button behavior for the specified bot has changed
updateSavedRingtones The list of saved notification sounds has changed, use account.getSavedRingtones to fetch the new list.
updateTranscribedAudio A pending voice message transcription » initiated with messages.transcribeAudio was updated.
updateReadFeaturedEmojiStickers Some featured custom emoji stickers were marked as read
updateUserEmojiStatus The emoji status of a certain user has changed
updateRecentEmojiStatuses The list of recent emoji statuses has changed
updateRecentReactions The list of recent message reactions has changed
updateMoveStickerSetToTop A stickerset was just moved to top, see here for more info »
updateMessageExtendedMedia You bought a paid media »: this update contains the revealed media.
updateChannelPinnedTopic A forum topic » was pinned or unpinned.
updateChannelPinnedTopics The pinned topics of a forum have changed.
updateUser User (user and/or userFull) information was updated.

This update can only be received through getDifference or in updates/updatesCombined constructors, so it will always come bundled with the updated user, that should be applied as usual », without re-fetching the info manually.

However, full peer information will not come bundled in updates, so the full peer cache (userFull) must be invalidated for user_id when receiving this update.
updateAutoSaveSettings Media autosave settings have changed and must be refetched using account.getAutoSaveSettings.
updateStory A new story was posted.
updateReadStories Stories of a specific peer were marked as read.
updateStoryID A story was successfully uploaded.

Once a story is successfully uploaded, an updateStoryID will be returned, indicating the story ID (id) that was attributed to the story (like for messages, random_id indicates the random_id that was passed to stories.sendStory: this way, you can tell which story was assigned a specific id by checking which stories.sendStory call has the returned random_id).
updateStoriesStealthMode Indicates that stories stealth mode was activated.
updateSentStoryReaction Indicates we reacted to a story ».
updateBotChatBoost A channel/supergroup boost has changed (bots only)
updateChannelViewForumAsMessages Users may also choose to display messages from all topics as if they were sent to a normal group, using a "View as messages" setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the channels.toggleViewForumAsMessages method; invoking this method will update the value of the view_forum_as_messages flag of channelFull or dialog and emit an updateChannelViewForumAsMessages.
updatePeerWallpaper The wallpaper » of a given peer has changed.
updateBotMessageReaction Bots only: a user has changed their reactions on a message with public reactions.
updateBotMessageReactions Bots only: the number of reactions on a message with anonymous reactions has changed.
updateSavedDialogPinned A saved message dialog was pinned/unpinned
updatePinnedSavedDialogs Pinned saved dialogs » were updated
updateSavedReactionTags The list of reaction tag » names assigned by the user has changed and should be refetched using messages.getSavedReactionTags ».
updateSmsJob A new SMS job was received
updateQuickReplies Info about or the order of quick reply shortcuts » was changed.
updateNewQuickReply A new quick reply shortcut » was created.
updateDeleteQuickReply A quick reply shortcut » was deleted. This will not emit updateDeleteQuickReplyMessages updates, even if all the messages in the shortcut are also deleted by this update.
updateQuickReplyMessage A new message was added to a quick reply shortcut ».
updateDeleteQuickReplyMessages One or more messages in a quick reply shortcut » were deleted.
updateBotBusinessConnect Connecting or disconnecting a business bot or changing the connection settings will emit an updateBotBusinessConnect update to the bot, with the new settings and a connection_id that will be used by the bot to handle updates from and send messages as the user.
updateBotNewBusinessMessage A message was received via a connected business chat ».
updateBotEditBusinessMessage A message was edited in a connected business chat ».
updateBotDeleteBusinessMessage A message was deleted in a connected business chat ».
updateNewStoryReaction Represents a new reaction to a story.
updateBroadcastRevenueTransactions A new channel ad revenue transaction was made, see here » for more info.
updateStarsBalance The current account's Telegram Stars balance » has changed.
updateBusinessBotCallbackQuery A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button.
updateStarsRevenueStatus The Telegram Star balance of a channel/bot we own has changed ».