pub enum InternalLinkType {
Show 25 variants GetInternalLinkType(GetInternalLinkType), ActiveSessions(InternalLinkTypeActiveSessions), AuthenticationCode(InternalLinkTypeAuthenticationCode), Background(InternalLinkTypeBackground), BotStart(InternalLinkTypeBotStart), BotStartInGroup(InternalLinkTypeBotStartInGroup), ChangePhoneNumber(InternalLinkTypeChangePhoneNumber), ChatInvite(InternalLinkTypeChatInvite), FilterSettings(InternalLinkTypeFilterSettings), Game(InternalLinkTypeGame), LanguagePack(InternalLinkTypeLanguagePack), Message(InternalLinkTypeMessage), MessageDraft(InternalLinkTypeMessageDraft), PassportDataRequest(InternalLinkTypePassportDataRequest), PhoneNumberConfirmation(InternalLinkTypePhoneNumberConfirmation), Proxy(InternalLinkTypeProxy), PublicChat(InternalLinkTypePublicChat), QrCodeAuthentication(InternalLinkTypeQrCodeAuthentication), Settings(InternalLinkTypeSettings), StickerSet(InternalLinkTypeStickerSet), Theme(InternalLinkTypeTheme), ThemeSettings(InternalLinkTypeThemeSettings), UnknownDeepLink(InternalLinkTypeUnknownDeepLink), UnsupportedProxy(InternalLinkTypeUnsupportedProxy), VideoChat(InternalLinkTypeVideoChat), // some variants omitted
}
Expand description

Describes an internal https://t.me or tg: link, which must be processed by the app in a special way

Variants§

§

GetInternalLinkType(GetInternalLinkType)

Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization

§

ActiveSessions(InternalLinkTypeActiveSessions)

The link is a link to the active sessions section of the app. Use getActiveSessions to handle the link

§

AuthenticationCode(InternalLinkTypeAuthenticationCode)

The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode

§

Background(InternalLinkTypeBackground)

The link is a link to a background. Call searchBackground with the given background name to process the link

§

BotStart(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

§

BotStartInGroup(InternalLinkTypeBotStartInGroup)

The link is a link to a Telegram bot, which is supposed 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 group to add the bot to, and then call sendBotStartMessage with the given start parameter and the chosen group chat. Bots can be added to a public group only by administrators of the group

§

ChangePhoneNumber(InternalLinkTypeChangePhoneNumber)

The link is a link to the change phone number section of the app

§

ChatInvite(InternalLinkTypeChatInvite)

The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link

§

FilterSettings(InternalLinkTypeFilterSettings)

The link is a link to the filter settings section of the app

§

Game(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

§

LanguagePack(InternalLinkTypeLanguagePack)

The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link

§

Message(InternalLinkTypeMessage)

The link is a link to a Telegram message. Call getMessageLinkInfo with the given URL to process the link

§

MessageDraft(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

§

PassportDataRequest(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 app, otherwise ignore it

§

PhoneNumberConfirmation(InternalLinkTypePhoneNumberConfirmation)

The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link

§

Proxy(InternalLinkTypeProxy)

The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy

§

PublicChat(InternalLinkTypePublicChat)

The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link

§

QrCodeAuthentication(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

§

Settings(InternalLinkTypeSettings)

The link is a link to app settings

§

StickerSet(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

§

Theme(InternalLinkTypeTheme)

The link is a link to a theme. TDLib has no theme support yet

§

ThemeSettings(InternalLinkTypeThemeSettings)

The link is a link to the theme settings section of the app

The link is an unknown tg: link. Call getDeepLinkInfo to process the link

§

UnsupportedProxy(InternalLinkTypeUnsupportedProxy)

The link is a link to an unsupported proxy. An alert can be shown to the user

§

VideoChat(InternalLinkTypeVideoChat)

The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGoupCall with the given invite hash to process the link

Implementations§

source§

impl InternalLinkType

source

pub fn from_json<S: AsRef<str>>(json: S) -> Result<Self>

Trait Implementations§

source§

impl AsRef<InternalLinkType> for InternalLinkType

source§

fn as_ref(&self) -> &InternalLinkType

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for InternalLinkType

source§

fn clone(&self) -> InternalLinkType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InternalLinkType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for InternalLinkType

source§

fn default() -> InternalLinkType

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for InternalLinkType

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for InternalLinkType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,