Module tdlight.api

Class TdApi.Message

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Message
Enclosing class:
TdApi

public static final class TdApi.Message extends TdApi.Object
Describes a message.
  • Field Details

    • id

      public long id
      Message identifier; unique for the chat to which the message belongs.
    • senderId

      public TdApi.MessageSender senderId
      Identifier of the sender of the message.
    • chatId

      public long chatId
      Chat identifier.
    • sendingState

      public TdApi.MessageSendingState sendingState
      The sending state of the message; may be null.
    • schedulingState

      public TdApi.MessageSchedulingState schedulingState
      The scheduling state of the message; may be null.
    • isOutgoing

      public boolean isOutgoing
      True, if the message is outgoing.
    • isPinned

      public boolean isPinned
      True, if the message is pinned.
    • canBeEdited

      public boolean canBeEdited
      True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application.
    • canBeForwarded

      public boolean canBeForwarded
      True, if the message can be forwarded.
    • canBeSaved

      public boolean canBeSaved
      True, if content of the message can be saved locally or copied.
    • canBeDeletedOnlyForSelf

      public boolean canBeDeletedOnlyForSelf
      True, if the message can be deleted only for the current user while other users will continue to see it.
    • canBeDeletedForAllUsers

      public boolean canBeDeletedForAllUsers
      True, if the message can be deleted for all users.
    • canGetStatistics

      public boolean canGetStatistics
      True, if the message statistics are available.
    • canGetMessageThread

      public boolean canGetMessageThread
      True, if the message thread info is available.
    • canGetViewers

      public boolean canGetViewers
      True, if chat members already viewed the message can be received through getMessageViewers.
    • hasTimestampedMedia

      public boolean hasTimestampedMedia
      True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
    • isChannelPost

      public boolean isChannelPost
      True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.
    • containsUnreadMention

      public boolean containsUnreadMention
      True, if the message contains an unread mention for the current user.
    • date

      public int date
      Point in time (Unix timestamp) when the message was sent.
    • editDate

      public int editDate
      Point in time (Unix timestamp) when the message was last edited.
    • forwardInfo

      public TdApi.MessageForwardInfo forwardInfo
      Information about the initial message sender; may be null.
    • interactionInfo

      public TdApi.MessageInteractionInfo interactionInfo
      Information about interactions with the message; may be null.
    • replyInChatId

      public long replyInChatId
      If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different replyInChatId and chatId.
    • replyToMessageId

      public long replyToMessageId
      If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message.
    • messageThreadId

      public long messageThreadId
      If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs.
    • ttl

      public int ttl
      For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires.
    • ttlExpiresIn

      public double ttlExpiresIn
      Time left before the message expires, in seconds. If the TTL timer isn't started yet, equals to the value of the ttl field.
    • viaBotUserId

      public long viaBotUserId
      If non-zero, the user identifier of the bot through which this message was sent.
    • authorSignature

      public String authorSignature
      For channel posts and anonymous group messages, optional author signature.
    • mediaAlbumId

      public long mediaAlbumId
      Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums.
    • restrictionReason

      public String restrictionReason
      If non-empty, contains a human-readable description of the reason why access to this message must be restricted.
    • content

      public TdApi.MessageContent content
      Content of the message.
    • replyMarkup

      public TdApi.ReplyMarkup replyMarkup
      Reply markup for the message; may be null.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • Message

      public Message()
      Describes a message.
    • Message

      public Message(long id, TdApi.MessageSender senderId, long chatId, TdApi.MessageSendingState sendingState, TdApi.MessageSchedulingState schedulingState, boolean isOutgoing, boolean isPinned, boolean canBeEdited, boolean canBeForwarded, boolean canBeSaved, boolean canBeDeletedOnlyForSelf, boolean canBeDeletedForAllUsers, boolean canGetStatistics, boolean canGetMessageThread, boolean canGetViewers, boolean canGetMediaTimestampLinks, boolean hasTimestampedMedia, boolean isChannelPost, boolean containsUnreadMention, int date, int editDate, TdApi.MessageForwardInfo forwardInfo, TdApi.MessageInteractionInfo interactionInfo, long replyInChatId, long replyToMessageId, long messageThreadId, int ttl, double ttlExpiresIn, long viaBotUserId, String authorSignature, long mediaAlbumId, String restrictionReason, TdApi.MessageContent content, TdApi.ReplyMarkup replyMarkup)
      Describes a message.
      Parameters:
      id - long Message identifier; unique for the chat to which the message belongs.
      senderId - MessageSender Identifier of the sender of the message.
      chatId - long Chat identifier.
      sendingState - MessageSendingState The sending state of the message; may be null.
      schedulingState - MessageSchedulingState The scheduling state of the message; may be null.
      isOutgoing - boolean True, if the message is outgoing.
      isPinned - boolean True, if the message is pinned.
      canBeEdited - boolean True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application.
      canBeForwarded - boolean True, if the message can be forwarded.
      canBeSaved - boolean True, if content of the message can be saved locally or copied.
      canBeDeletedOnlyForSelf - boolean True, if the message can be deleted only for the current user while other users will continue to see it.
      canBeDeletedForAllUsers - boolean True, if the message can be deleted for all users.
      canGetStatistics - boolean True, if the message statistics are available.
      canGetMessageThread - boolean True, if the message thread info is available.
      canGetViewers - boolean True, if chat members already viewed the message can be received through getMessageViewers.
      canGetMediaTimestampLinks - boolean True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description.
      hasTimestampedMedia - boolean True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
      isChannelPost - boolean True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.
      containsUnreadMention - boolean True, if the message contains an unread mention for the current user.
      date - int Point in time (Unix timestamp) when the message was sent.
      editDate - int Point in time (Unix timestamp) when the message was last edited.
      forwardInfo - MessageForwardInfo Information about the initial message sender; may be null.
      interactionInfo - MessageInteractionInfo Information about interactions with the message; may be null.
      replyInChatId - long If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different replyInChatId and chatId.
      replyToMessageId - long If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message.
      messageThreadId - long If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs.
      ttl - int For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires.
      ttlExpiresIn - double Time left before the message expires, in seconds. If the TTL timer isn't started yet, equals to the value of the ttl field.
      viaBotUserId - long If non-zero, the user identifier of the bot through which this message was sent.
      authorSignature - String For channel posts and anonymous group messages, optional author signature.
      mediaAlbumId - long Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums.
      restrictionReason - String If non-empty, contains a human-readable description of the reason why access to this message must be restricted.
      content - MessageContent Content of the message.
      replyMarkup - ReplyMarkup Reply markup for the message; may be null.
    • Message

      public Message(DataInput input) throws IOException
      Describes a message.
      Throws:
      IOException
  • Method Details