- Enclosing class:
- TdApi
public static final class TdApi.SponsoredMessage
extends TdApi.Object
Describes a sponsored message.
-
Field Summary
Fields
If non-empty, additional information about the sponsored message to be shown along with the message.
static final int
Identifier uniquely determining type of the object.
boolean
True, if the message needs to be labeled as "recommended" instead of "sponsored".
An internal link to be opened when the sponsored message is clicked; may be null if the sponsor chat needs to be opened instead.
long
Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
boolean
True, if the sponsor's chat photo must be shown.
long
Sponsor chat identifier; 0 if the sponsor chat is accessible through an invite link.
Information about the sponsor chat; may be null unless sponsorChatId == 0.
If non-empty, information about the sponsor to be shown along with the message.
-
Constructor Summary
Constructors
Describes a sponsored message.
Describes a sponsored message.
Describes a sponsored message.
-
Method Summary
boolean
int
Returns an identifier uniquely determining type of the object.
int
void
Serialize the TDLib class
-
Field Details
-
messageId
public long messageId
Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
-
isRecommended
public boolean isRecommended
True, if the message needs to be labeled as "recommended" instead of "sponsored".
-
-
-
showChatPhoto
public boolean showChatPhoto
True, if the sponsor's chat photo must be shown.
-
link
An internal link to be opened when the sponsored message is clicked; may be null if the sponsor chat needs to be opened instead.
-
content
Content of the message. Currently, can be only of the type messageText.
-
-
additionalInfo
If non-empty, additional information about the sponsored message to be shown along with the message.
-
CONSTRUCTOR
public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.
- See Also:
-
-
Constructor Details
-
SponsoredMessage
public SponsoredMessage()
Describes a sponsored message.
-
SponsoredMessage
Describes a sponsored message.
- Parameters:
messageId
- Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
isRecommended
- True, if the message needs to be labeled as "recommended" instead of "sponsored".
sponsorChatId
- Sponsor chat identifier; 0 if the sponsor chat is accessible through an invite link.
sponsorChatInfo
- Information about the sponsor chat; may be null unless sponsorChatId == 0.
showChatPhoto
- True, if the sponsor's chat photo must be shown.
link
- An internal link to be opened when the sponsored message is clicked; may be null if the sponsor chat needs to be opened instead.
content
- Content of the message. Currently, can be only of the type messageText.
sponsorInfo
- If non-empty, information about the sponsor to be shown along with the message.
additionalInfo
- If non-empty, additional information about the sponsored message to be shown along with the message.
-
-
Method Details
-
getConstructor
public int getConstructor()
Returns an identifier uniquely determining type of the object.
- Specified by:
getConstructor
in class TdApi.Object
- Returns:
- this.CONSTRUCTOR
-
serialize
Serialize the TDLib class
- Specified by:
serialize
in class TdApi.Object
- Parameters:
output
- output data stream
- Throws:
IOException
- the serialization failed
-
-