Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data InternalLinkType
- = InternalLinkTypeActiveSessions
- | InternalLinkTypeAttachmentMenuBot {
- target_chat :: Maybe TargetChat
- bot_username :: Maybe Text
- url :: Maybe Text
- | InternalLinkTypeAuthenticationCode { }
- | InternalLinkTypeBackground { }
- | InternalLinkTypeBotAddToChannel { }
- | InternalLinkTypeBotStart { }
- | InternalLinkTypeBotStartInGroup { }
- | InternalLinkTypeBusinessChat { }
- | InternalLinkTypeBuyStars { }
- | InternalLinkTypeChangePhoneNumber
- | InternalLinkTypeChatAffiliateProgram { }
- | InternalLinkTypeChatBoost { }
- | InternalLinkTypeChatFolderInvite {
- invite_link :: Maybe Text
- | InternalLinkTypeChatFolderSettings
- | InternalLinkTypeChatInvite {
- invite_link :: Maybe Text
- | InternalLinkTypeDefaultMessageAutoDeleteTimerSettings
- | InternalLinkTypeEditProfileSettings
- | InternalLinkTypeGame { }
- | InternalLinkTypeInstantView { }
- | InternalLinkTypeInvoice { }
- | InternalLinkTypeLanguagePack { }
- | InternalLinkTypeLanguageSettings
- | InternalLinkTypeMainWebApp { }
- | InternalLinkTypeMessage { }
- | InternalLinkTypeMessageDraft { }
- | InternalLinkTypePassportDataRequest {
- bot_user_id :: Maybe Int
- scope :: Maybe Text
- public_key :: Maybe Text
- nonce :: Maybe Text
- callback_url :: Maybe Text
- | InternalLinkTypePhoneNumberConfirmation { }
- | InternalLinkTypePremiumFeatures { }
- | InternalLinkTypePremiumGift { }
- | InternalLinkTypePremiumGiftCode { }
- | InternalLinkTypePrivacyAndSecuritySettings
- | InternalLinkTypeProxy { }
- | InternalLinkTypePublicChat { }
- | InternalLinkTypeQrCodeAuthentication
- | InternalLinkTypeRestorePurchases
- | InternalLinkTypeSettings
- | InternalLinkTypeStickerSet { }
- | InternalLinkTypeStory { }
- | InternalLinkTypeTheme {
- theme_name :: Maybe Text
- | InternalLinkTypeThemeSettings
- | InternalLinkTypeUnknownDeepLink { }
- | InternalLinkTypeUnsupportedProxy
- | InternalLinkTypeUserPhoneNumber { }
- | InternalLinkTypeUserToken { }
- | InternalLinkTypeVideoChat { }
- | InternalLinkTypeWebApp { }
Documentation
data InternalLinkType Source #
Describes an internal https://t.me or tg: link, which must be processed by the application in a special way
InternalLinkTypeActiveSessions | The link is a link to the Devices section of the application. Use getActiveSessions to get the list of active sessions and show them to the user |
InternalLinkTypeAttachmentMenuBot | The link is a link to an attachment menu bot to be opened in the specified or a chosen chat. Process given target_chat to open the chat. Then, call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then, use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. If the attachment menu bot can't be used in the opened chat, show an error to the user. If the bot is added to attachment menu and can be used in the chat, then use openWebApp with the given URL |
| |
InternalLinkTypeAuthenticationCode | The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode |
InternalLinkTypeBackground | The link is a link to a background. Call searchBackground with the given background name to process the link. If background is found and the user wants to apply it, then call setDefaultBackground |
| |
InternalLinkTypeBotAddToChannel | The link is a link to a Telegram bot, which is expected to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights |
| |
InternalLinkTypeBotStart | The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot, and then call sendBotStartMessage with the given start parameter after the button is pressed |
| |
InternalLinkTypeBotStartInGroup | The link is a link to a Telegram bot, which is expected to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup. If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. Then, if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat; otherwise, just send /start message with bot's username added to the chat |
| |
InternalLinkTypeBusinessChat | The link is a link to a business chat. Use getBusinessChatLinkInfo with the provided link name to get information about the link, then open received private chat and replace chat draft with the provided text |
InternalLinkTypeBuyStars | The link is a link to the Telegram Star purchase section of the application |
InternalLinkTypeChangePhoneNumber | The link is a link to the change phone number section of the application |
InternalLinkTypeChatAffiliateProgram | The link is an affiliate program link. Call searchChatAffiliateProgram with the given username and referrer to process the link |
InternalLinkTypeChatBoost | The link is a link to boost a Telegram chat. Call getChatBoostLinkInfo with the given URL to process the link. If the chat is found, then call getChatBoostStatus and getAvailableChatBoostSlots to get the current boost status and check whether the chat can be boosted. If the user wants to boost the chat and the chat can be boosted, then call boostChat |
InternalLinkTypeChatFolderInvite | The link is an invite link to a chat folder. Call checkChatFolderInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat folder, then call addChatFolderByInviteLink |
| |
InternalLinkTypeChatFolderSettings | The link is a link to the folder section of the application settings |
InternalLinkTypeChatInvite | The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link. If the link is valid and the user wants to join the chat, then call joinChatByInviteLink |
| |
InternalLinkTypeDefaultMessageAutoDeleteTimerSettings | The link is a link to the default message auto-delete timer settings section of the application settings |
InternalLinkTypeEditProfileSettings | The link is a link to the edit profile section of the application settings |
InternalLinkTypeGame | The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame |
| |
InternalLinkTypeInstantView | The link must be opened in an Instant View. Call getWebPageInstantView with the given URL to process the link. If Instant View is found, then show it, otherwise, open the fallback URL in an external browser |
InternalLinkTypeInvoice | The link is a link to an invoice. Call getPaymentForm with the given invoice name to process the link |
| |
InternalLinkTypeLanguagePack | The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link. If the language pack is found and the user wants to apply it, then call setOption for the option "language_pack_id" |
| |
InternalLinkTypeLanguageSettings | The link is a link to the language section of the application settings |
InternalLinkTypeMainWebApp | The link is a link to the main Web App of a bot. Call searchPublicChat with the given bot username, check that the user is a bot and has the main Web App. If the bot can be added to attachment menu, then use getAttachmentMenuBot to receive information about the bot, then if the bot isn't added to side menu, show a disclaimer about Mini Apps being third-party applications, ask the user to accept their Terms of service and confirm adding the bot to side and attachment menu, then if the user accepts the terms and confirms adding, use toggleBotIsAddedToAttachmentMenu to add the bot. Then, use getMainWebApp with the given start parameter and mode and open the returned URL as a Web App |
| |
InternalLinkTypeMessage | The link is a link to a Telegram message or a forum topic. Call getMessageLinkInfo with the given URL to process the link, and then open received forum topic or chat and show the message there |
InternalLinkTypeMessageDraft | The link contains a message draft text. A share screen needs to be shown to the user, then the chosen chat must be opened and the text is added to the input field |
| |
InternalLinkTypePassportDataRequest | The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the application; otherwise, ignore it |
| |
InternalLinkTypePhoneNumberConfirmation | The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberCode with the given phone number and with phoneNumberCodeTypeConfirmOwnership with the given hash to process the link. If succeeded, call checkPhoneNumberCode to check entered by the user code, or resendPhoneNumberCode to resend it |
InternalLinkTypePremiumFeatures | The link is a link to the Premium features screen of the application from which the user can subscribe to Telegram Premium. Call getPremiumFeatures with the given referrer to process the link |
InternalLinkTypePremiumGift | The link is a link to the screen for gifting Telegram Premium subscriptions to friends via inputInvoiceTelegram with telegramPaymentPurposePremiumGiftCodes payments or in-store purchases |
InternalLinkTypePremiumGiftCode | The link is a link with a Telegram Premium gift code. Call checkPremiumGiftCode with the given code to process the link. If the code is valid and the user wants to apply it, then call applyPremiumGiftCode |
InternalLinkTypePrivacyAndSecuritySettings | The link is a link to the privacy and security section of the application settings |
InternalLinkTypeProxy | The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy |
InternalLinkTypePublicChat | The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link. If the chat is found, open its profile information screen or the chat itself. If draft text isn't empty and the chat is a private chat with a regular user, then put the draft text in the input field |
| |
InternalLinkTypeQrCodeAuthentication | The link can be used to login the current user on another device, but it must be scanned from QR-code using in-app camera. An alert similar to "This code can be used to allow someone to log in to your Telegram account. To confirm Telegram login, please go to Settings > Devices > Scan QR and scan the code" needs to be shown |
InternalLinkTypeRestorePurchases | The link forces restore of App Store purchases when opened. For official iOS application only |
InternalLinkTypeSettings | The link is a link to application settings |
InternalLinkTypeStickerSet | The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set. If the sticker set is found and the user wants to add it, then call changeStickerSet |
| |
InternalLinkTypeStory | The link is a link to a story. Call searchPublicChat with the given sender username, then call getStory with the received chat identifier and the given story identifier, then show the story if received |
InternalLinkTypeTheme | The link is a link to a cloud theme. TDLib has no theme support yet |
| |
InternalLinkTypeThemeSettings | The link is a link to the theme section of the application settings |
InternalLinkTypeUnknownDeepLink | The link is an unknown tg: link. Call getDeepLinkInfo to process the link |
InternalLinkTypeUnsupportedProxy | The link is a link to an unsupported proxy. An alert can be shown to the user |
InternalLinkTypeUserPhoneNumber | The link is a link to a user by its phone number. Call searchUserByPhoneNumber with the given phone number to process the link. If the user is found, then call createPrivateChat and open user's profile information screen or the chat itself. If draft text isn't empty, then put the draft text in the input field |
| |
InternalLinkTypeUserToken | The link is a link to a user by a temporary token. Call searchUserByToken with the given token to process the link. If the user is found, then call createPrivateChat and open the chat |
InternalLinkTypeVideoChat | The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGroupCall with the given invite hash to process the link |
| |
InternalLinkTypeWebApp | The link is a link to a Web App. Call searchPublicChat with the given bot username, check that the user is a bot, then call searchWebApp with the received bot and the given web_app_short_name. Process received foundWebApp by showing a confirmation dialog if needed. If the bot can be added to attachment or side menu, but isn't added yet, then show a disclaimer about Mini Apps being third-party applications instead of the dialog and ask the user to accept their Terms of service. If the user accept the terms and confirms adding, then use toggleBotIsAddedToAttachmentMenu to add the bot. Then, call getWebAppLinkUrl and open the returned URL as a Web App |
|
Instances
FromJSON InternalLinkType Source # | |
Defined in TD.Data.InternalLinkType parseJSON :: Value -> Parser InternalLinkType # parseJSONList :: Value -> Parser [InternalLinkType] # | |
ToJSON InternalLinkType Source # | |
Defined in TD.Data.InternalLinkType toJSON :: InternalLinkType -> Value # toEncoding :: InternalLinkType -> Encoding # toJSONList :: [InternalLinkType] -> Value # toEncodingList :: [InternalLinkType] -> Encoding # | |
Show InternalLinkType Source # | |
Defined in TD.Data.InternalLinkType showsPrec :: Int -> InternalLinkType -> ShowS # show :: InternalLinkType -> String # showList :: [InternalLinkType] -> ShowS # | |
Eq InternalLinkType Source # | |
Defined in TD.Data.InternalLinkType (==) :: InternalLinkType -> InternalLinkType -> Bool # (/=) :: InternalLinkType -> InternalLinkType -> Bool # | |
ShortShow InternalLinkType Source # | |
Defined in TD.Data.InternalLinkType shortShow :: InternalLinkType -> String Source # |