TDLib
Loading...
Searching...
No Matches
internalLinkTypeMainWebApp Class Referencefinal

Inherits InternalLinkType.

Description

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.

Public Member Functions

 internalLinkTypeMainWebApp ()
 internalLinkTypeMainWebApp (string const &bot_username_, string const &start_parameter_, object_ptr< WebAppOpenMode > &&mode_)
void store (TlStorerToString &s, const char *field_name) const final
Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
TlObject & operator= (TlObject &&)=default
virtual void store (TlStorerCalcLength &s) const
virtual void store (TlStorerUnsafe &s) const
 TlObject ()=default
 TlObject (const TlObject &)=delete
 TlObject (TlObject &&)=default
virtual ~TlObject ()=default

Public Attributes

string bot_username_
 Username of the bot.
object_ptr< WebAppOpenMode > mode_
 The mode to be passed to getMainWebApp.
string start_parameter_
 Start parameter to be passed to getMainWebApp.

Static Public Attributes

static const std::int32_t ID = 1574925033
 Identifier uniquely determining a type of the object.

Constructor & Destructor Documentation

◆ internalLinkTypeMainWebApp() [1/2]

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.

◆ internalLinkTypeMainWebApp() [2/2]

internalLinkTypeMainWebApp ( string const & bot_username_,
string const & start_parameter_,
object_ptr< WebAppOpenMode > && mode_ )

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.

Parameters
[in]bot_username_Username of the bot.
[in]start_parameter_Start parameter to be passed to getMainWebApp.
[in]mode_The mode to be passed to getMainWebApp.

Member Function Documentation

◆ store()

void store ( TlStorerToString & s,
const char * field_name ) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: