haskell-tdlib-2.0.47.0
Safe HaskellSafe-Inferred
LanguageGHC2021

TD.Data.Update

Synopsis

Documentation

data Update Source #

Contains notifications about data changes

Constructors

UpdateAuthorizationState

The user authorization state has changed

Fields

UpdateNewMessage

A new message was received; can also be an outgoing message

Fields

UpdateMessageSendAcknowledged

A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully. This update is sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message

Fields

UpdateMessageSendSucceeded

A message has been successfully sent

Fields

UpdateMessageSendFailed

A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update

Fields

UpdateMessageContent

The message content has changed

Fields

UpdateMessageEdited

A message was edited. Changes in the message content will come in a separate updateMessageContent

Fields

UpdateMessageIsPinned

The message pinned state was changed

Fields

UpdateMessageInteractionInfo

The information about interactions with a message has changed

Fields

UpdateMessageContentOpened

The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the self-destruct timer

Fields

UpdateMessageMentionRead

A message with an unread mention was read

Fields

UpdateMessageUnreadReactions

The list of unread reactions added to a message was changed

Fields

UpdateMessageFactCheck

A fact-check added to a message was changed

Fields

UpdateMessageLiveLocationViewed

A message with a live location was viewed. When the update is received, the application is expected to update the live location

Fields

UpdateNewChat

A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates

Fields

UpdateChatTitle

The title of a chat was changed

Fields

UpdateChatPhoto

A chat photo was changed

Fields

UpdateChatAccentColors

Chat accent colors have changed

Fields

UpdateChatPermissions

Chat permissions were changed

Fields

UpdateChatLastMessage

The last message of a chat was changed

Fields

  • chat_id :: Maybe Int

    The chat identifier of the sent message

  • last_message :: Maybe Message

    The new last message in the chat; may be null if the last message became unknown. While the last message is unknown, new messages can be added to the chat without corresponding updateNewMessage update

  • positions :: Maybe [ChatPosition]

    The new chat positions in the chat lists

UpdateChatPosition

The position of a chat in a chat list has changed. An updateChatLastMessage or updateChatDraftMessage update might be sent instead of the update

Fields

UpdateChatAddedToList

A chat was added to a chat list

Fields

UpdateChatRemovedFromList

A chat was removed from a chat list

Fields

UpdateChatReadInbox

Incoming messages were read or the number of unread messages has been changed

Fields

UpdateChatReadOutbox

Outgoing messages were read

Fields

UpdateChatActionBar

The chat action bar was changed

Fields

UpdateChatBusinessBotManageBar

The bar for managing business bot was changed in a chat

Fields

UpdateChatAvailableReactions

The chat available reactions were changed

Fields

UpdateChatDraftMessage

A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied

Fields

UpdateChatEmojiStatus

Chat emoji status has changed

Fields

UpdateChatMessageSender

The message sender that is selected to send messages in a chat has changed

Fields

UpdateChatMessageAutoDeleteTime

The message auto-delete or self-destruct timer setting for a chat was changed

Fields

UpdateChatNotificationSettings

Notification settings for a chat were changed

Fields

UpdateChatPendingJoinRequests

The chat pending join requests were changed

Fields

UpdateChatReplyMarkup

The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user

Fields

UpdateChatBackground

The chat background was changed

Fields

UpdateChatTheme

The chat theme was changed

Fields

UpdateChatUnreadMentionCount

The chat unread_mention_count has changed

Fields

UpdateChatUnreadReactionCount

The chat unread_reaction_count has changed

Fields

UpdateChatVideoChat

A chat video chat state has changed

Fields

UpdateChatDefaultDisableNotification

The value of the default disable_notification parameter, used when a message is sent to the chat, was changed

Fields

UpdateChatHasProtectedContent

A chat content was allowed or restricted for saving

Fields

UpdateChatIsTranslatable

Translation of chat messages was enabled or disabled

Fields

UpdateChatIsMarkedAsUnread

A chat was marked as unread or was read

Fields

UpdateChatViewAsTopics

A chat default appearance has changed

Fields

UpdateChatBlockList

A chat was blocked or unblocked

Fields

UpdateChatHasScheduledMessages

A chat's has_scheduled_messages field has changed

Fields

UpdateChatFolders

The list of chat folders or a chat folder has changed

Fields

UpdateChatOnlineMemberCount

The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it is sent just after the number of online users has changed

Fields

UpdateSavedMessagesTopic

Basic information about a Saved Messages topic has changed. This update is guaranteed to come before the topic identifier is returned to the application

Fields

UpdateSavedMessagesTopicCount

Number of Saved Messages topics has changed

Fields

UpdateQuickReplyShortcut

Basic information about a quick reply shortcut has changed. This update is guaranteed to come before the quick shortcut name is returned to the application

Fields

UpdateQuickReplyShortcutDeleted

A quick reply shortcut and all its messages were deleted

Fields

UpdateQuickReplyShortcuts

The list of quick reply shortcuts has changed

Fields

UpdateQuickReplyShortcutMessages

The list of quick reply shortcut messages has changed

Fields

UpdateForumTopicInfo

Basic information about a topic in a forum chat was changed

Fields

UpdateScopeNotificationSettings

Notification settings for some type of chats were updated

Fields

UpdateReactionNotificationSettings

Notification settings for reactions were updated

Fields

UpdateNotification

A notification was changed

Fields

UpdateNotificationGroup

A list of active notifications in a notification group has changed

Fields

UpdateActiveNotifications

Contains active notifications that were shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update

Fields

UpdateHavePendingNotifications

Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications

Fields

UpdateDeleteMessages

Some messages were deleted

Fields

  • chat_id :: Maybe Int

    The chat identifier of the sent message

  • message_ids :: Maybe [Int]

    Identifiers of the deleted messages

  • is_permanent :: Maybe Bool

    True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible)

  • from_cache :: Maybe Bool

    True, if the messages are deleted only from the cache and can possibly be retrieved again in the future

UpdateChatAction

A message sender activity in the chat has changed

Fields

UpdateUserStatus

The user went online or offline

Fields

UpdateUser

Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application

Fields

UpdateBasicGroup

Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application

Fields

UpdateSupergroup

Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application

Fields

UpdateSecretChat

Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application

Fields

UpdateUserFullInfo

Some data in userFullInfo has been changed

Fields

UpdateBasicGroupFullInfo

Some data in basicGroupFullInfo has been changed

Fields

UpdateSupergroupFullInfo

Some data in supergroupFullInfo has been changed

Fields

UpdateServiceNotification

A service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification

Fields

UpdateFile

Information about a file was updated

Fields

UpdateFileGenerationStart

The file generation process needs to be started by the application. Use setFileGenerationProgress and finishFileGeneration to generate the file

Fields

  • generation_id :: Maybe Int

    Unique identifier for the generation process

  • original_path :: Maybe Text

    The original path specified by the application in inputFileGenerated

  • destination_path :: Maybe Text

    The path to a file that must be created and where the new file must be generated by the application. If the application has no access to the path, it can use writeGeneratedFilePart to generate the file

  • conversion :: Maybe Text

    If the conversion is "" than original_path contains an HTTP/HTTPS URL of a file that must be downloaded by the application. Otherwise, this is the conversion specified by the application in inputFileGenerated

UpdateFileGenerationStop

File generation is no longer needed

Fields

UpdateFileDownloads

The state of the file download list has changed

Fields

UpdateFileAddedToDownloads

A file was added to the file download list. This update is sent only after file download list is loaded for the first time

Fields

UpdateFileDownload

A file download was changed. This update is sent only after file download list is loaded for the first time

Fields

UpdateFileRemovedFromDownloads

A file was removed from the file download list. This update is sent only after file download list is loaded for the first time

Fields

UpdateApplicationVerificationRequired

A request can't be completed unless application verification is performed; for official mobile applications only. The method setApplicationVerificationToken must be called once the verification is completed or failed

Fields

  • verification_id :: Maybe Int

    Unique identifier for the verification process

  • nonce :: Maybe Text

    Unique base64url-encoded nonce for the classic Play Integrity verification (https:/developer.android.comgoogleplayintegrity/classic) for Android, or a unique string to compare with verify_nonce field from a push notification for iOS

  • cloud_project_number :: Maybe Int

    Cloud project number to pass to the Play Integrity API on Android

UpdateCall

New call was created or information about a call was updated

Fields

UpdateGroupCall

Information about a group call was updated

Fields

UpdateGroupCallParticipant

Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined

Fields

UpdateNewCallSignalingData

New call signaling data arrived

Fields

UpdateUserPrivacySettingRules

Some privacy setting rules have been changed

Fields

UpdateUnreadMessageCount

Number of unread messages in a chat list has changed. This update is sent only if the message database is used

Fields

UpdateUnreadChatCount

Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used

Fields

UpdateStory

A story was changed

Fields

UpdateStoryDeleted

A story became inaccessible

Fields

UpdateStorySendSucceeded

A story has been successfully sent

Fields

UpdateStorySendFailed

A story failed to send. If the story sending is canceled, then updateStoryDeleted will be received instead of this update

Fields

UpdateChatActiveStories

The list of active stories posted by a specific chat has changed

Fields

UpdateStoryListChatCount

Number of chats in a story list has changed

Fields

UpdateStoryStealthMode

Story stealth mode settings have changed

Fields

UpdateOption

An option changed its value

Fields

UpdateStickerSet

A sticker set has changed

Fields

UpdateInstalledStickerSets

The list of installed sticker sets was updated

Fields

UpdateTrendingStickerSets

The list of trending sticker sets was updated or some of them were viewed

Fields

UpdateRecentStickers

The list of recently used stickers was updated

Fields

  • is_attached :: Maybe Bool

    True, if the list of stickers attached to photo or video files was updated; otherwise, the list of sent stickers is updated

  • sticker_ids :: Maybe [Int]

    The new list of file identifiers of recently used stickers

UpdateFavoriteStickers

The list of favorite stickers was updated

Fields

UpdateSavedAnimations

The list of saved animations was updated

Fields

UpdateSavedNotificationSounds

The list of saved notification sounds was updated. This update may not be sent until information about a notification sound was requested for the first time

Fields

UpdateDefaultBackground

The default background has changed

Fields

UpdateChatThemes

The list of available chat themes has changed

Fields

UpdateAccentColors

The list of supported accent colors has changed

Fields

  • colors :: Maybe [AccentColor]

    Information about supported colors; colors with identifiers 0 (red), 1 (orange), 2 (purple/violet), 3 (green), 4 (cyan), 5 (blue), 6 (pink) must always be supported and aren't included in the list. The exact colors for the accent colors with identifiers 0-6 must be taken from the app theme

  • available_accent_color_ids :: Maybe [Int]

    The list of accent color identifiers, which can be set through setAccentColor and setChatAccentColor. The colors must be shown in the specififed order

UpdateProfileAccentColors

The list of supported accent colors for user profiles has changed

Fields

UpdateLanguagePackStrings

Some language pack strings have been updated

Fields

UpdateConnectionState

The connection state has changed. This update must be used only to show a human-readable description of the connection state

Fields

UpdateTermsOfService

New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason "Decline ToS update"

Fields

UpdateUsersNearby

The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request

Fields

UpdateUnconfirmedSession

The first unconfirmed session has changed

Fields

UpdateAttachmentMenuBots

The list of bots added to attachment or side menu has changed

Fields

UpdateWebAppMessageSent

A message was sent by an opened Web App, so the Web App needs to be closed

Fields

UpdateActiveEmojiReactions

The list of active emoji reactions has changed

Fields

UpdateAvailableMessageEffects

The list of available message effects has changed

Fields

UpdateDefaultReactionType

The type of default reaction has changed

Fields

UpdateSavedMessagesTags

Tags used in Saved Messages or a Saved Messages topic have changed

Fields

UpdateActiveLiveLocationMessages

The list of messages with active live location that need to be updated by the application has changed. The list is persistent across application restarts only if the message database is used

Fields

UpdateOwnedStarCount

The number of Telegram Stars owned by the current user has changed

Fields

UpdateChatRevenueAmount

The revenue earned from sponsored messages in a chat has changed. If chat revenue screen is opened, then getChatRevenueTransactions may be called to fetch new transactions

Fields

UpdateStarRevenueStatus

The Telegram Star revenue earned by a bot or a chat has changed. If Telegram Star transaction screen of the chat is opened, then getStarTransactions may be called to fetch new transactions

Fields

UpdateSpeechRecognitionTrial

The parameters of speech recognition without Telegram Premium subscription has changed

Fields

UpdateDiceEmojis

The list of supported dice emojis has changed

Fields

UpdateAnimatedEmojiMessageClicked

Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played

Fields

UpdateAnimationSearchParameters

The parameters of animation search through getOption("animation_search_bot_username") bot has changed

Fields

UpdateSuggestedActions

The list of suggested to the user actions has changed

Fields

UpdateSpeedLimitNotification

Download or upload file speed for the user was limited, but it can be restored by subscription to Telegram Premium. The notification can be postponed until a being downloaded or uploaded file is visible to the user. Use getOption("premium_download_speedup") or getOption("premium_upload_speedup") to get expected speedup after subscription to Telegram Premium

Fields

  • is_upload :: Maybe Bool

    True, if upload speed was limited; false, if download speed was limited

UpdateContactCloseBirthdays

The list of contacts that had birthdays recently or will have birthday soon has changed

Fields

UpdateAutosaveSettings

Autosave settings for some type of chats were updated

Fields

UpdateBusinessConnection

A business connection has changed; for bots only

Fields

UpdateNewBusinessMessage

A new message was added to a business account; for bots only

Fields

UpdateBusinessMessageEdited

A message in a business account was edited; for bots only

Fields

UpdateBusinessMessagesDeleted

Messages in a business account were deleted; for bots only

Fields

UpdateNewInlineQuery

A new incoming inline query; for bots only

Fields

UpdateNewChosenInlineResult

The user has chosen a result of an inline query; for bots only

Fields

UpdateNewCallbackQuery

A new incoming callback query; for bots only

Fields

UpdateNewInlineCallbackQuery

A new incoming callback query from a message sent via a bot; for bots only

Fields

UpdateNewBusinessCallbackQuery

A new incoming callback query from a business message; for bots only

Fields

UpdateNewShippingQuery

A new incoming shipping query; for bots only. Only for invoices with flexible price

Fields

UpdateNewPreCheckoutQuery

A new incoming pre-checkout query; for bots only. Contains full information about a checkout

Fields

UpdateNewCustomEvent

A new incoming event; for bots only

Fields

UpdateNewCustomQuery

A new incoming query; for bots only

Fields

UpdatePoll

A poll was updated; for bots only

Fields

UpdatePollAnswer

A user changed the answer to a poll; for bots only

Fields

UpdateChatMember

User rights changed in a chat; for bots only

Fields

UpdateNewChatJoinRequest

A user sent a join request to a chat; for bots only

Fields

UpdateChatBoost

A chat boost has changed; for bots only

Fields

UpdateMessageReaction

User changed its reactions on a message with public reactions; for bots only

Fields

UpdateMessageReactions

Reactions added to a message with anonymous reactions have changed; for bots only

Fields

UpdatePaidMediaPurchased

Paid media were purchased by a user; for bots only

Fields

Instances

Instances details
FromJSON Update Source # 
Instance details

Defined in TD.Data.Update

Show Update Source # 
Instance details

Defined in TD.Data.Update

Eq Update Source # 
Instance details

Defined in TD.Data.Update

Methods

(==) :: Update -> Update -> Bool #

(/=) :: Update -> Update -> Bool #

ShortShow Update Source # 
Instance details

Defined in TD.Data.Update