Class TdApi.SponsoredMessage

  • Enclosing class:
    TdApi

    public static class TdApi.SponsoredMessage
    extends TdApi.Object
    Describes a sponsored message.
    • Field Detail

      • messageId

        public long messageId
        Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
      • sponsorChatId

        public long sponsorChatId
        Chat identifier.
      • link

        public TdApi.InternalLinkType link
        An internal link to be opened when the sponsored message is clicked; may be null. If null, the sponsor chat needs to be opened instead.
      • content

        public TdApi.MessageContent content
        Content of the message. Currently, can be only of the type messageText.
      • CONSTRUCTOR

        public static final int CONSTRUCTOR
        Identifier uniquely determining type of the object.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SponsoredMessage

        public SponsoredMessage()
        Describes a sponsored message.
      • SponsoredMessage

        public SponsoredMessage​(long messageId,
                                long sponsorChatId,
                                TdApi.InternalLinkType link,
                                TdApi.MessageContent content)
        Describes a sponsored message.
        Parameters:
        messageId - Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages.
        sponsorChatId - Chat identifier.
        link - An internal link to be opened when the sponsored message is clicked; may be null. If null, the sponsor chat needs to be opened instead.
        content - Content of the message. Currently, can be only of the type messageText.