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 Summary

    Fields
    Modifier and Type
    Field
    Description
    For channel posts and anonymous group messages, optional author signature.
    double
    Time left before the message will be automatically deleted by messageAutoDeleteTime setting of the chat, in seconds; 0 if never.
    boolean
    True, if the message can be deleted for all users.
    boolean
    True, if the message can be deleted only for the current user while other users will continue to see it.
    boolean
    True, if the message can be edited.
    boolean
    True, if the message can be forwarded.
    boolean
    True, if content of the message can be saved locally or copied.
    boolean
    True, if the list of added reactions is available through getMessageAddedReactions.
    boolean
    True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink.
    boolean
    True, if information about the message thread is available through getMessageThread and getMessageThreadHistory.
    boolean
    True, if the message statistics are available through getMessageStatistics.
    boolean
    True, if chat members already viewed the message can be received through getMessageViewers.
    boolean
    True, if reactions on the message can be reported through reportMessageReactions.
    long
    Chat identifier.
    static final int
    Identifier uniquely determining type of the object.
    boolean
    True, if the message contains an unread mention for the current user.
    Content of the message.
    int
    Point in time (Unix timestamp) when the message was sent.
    int
    Point in time (Unix timestamp) when the message was last edited.
    Information about the initial message sender; may be null.
    boolean
    True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
    long
    Message identifier; unique for the chat to which the message belongs.
    Information about interactions with the message; may be null.
    boolean
    True, if the message is a channel post.
    boolean
    True, if the message is outgoing.
    boolean
    True, if the message is pinned.
    boolean
    True, if the message is a forum topic message.
    long
    Unique identifier of an album this message belongs to.
    long
    If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs.
    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.
    Reply markup for the message; may be null.
    long
    If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message.
    If non-empty, contains a human-readable description of the reason why access to this message must be restricted.
    The scheduling state of the message; may be null.
    double
    Time left before the message self-destruct timer expires, in seconds.
    int
    The message's self-destruct time, in seconds; 0 if none.
    Identifier of the sender of the message.
    The sending state of the message; may be null.
    Information about unread reactions added to the message.
    long
    If non-zero, the user identifier of the bot through which this message was sent.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Describes a message.
    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 canGetAddedReactions, boolean canGetStatistics, boolean canGetMessageThread, boolean canGetViewers, boolean canGetMediaTimestampLinks, boolean canReportReactions, boolean hasTimestampedMedia, boolean isChannelPost, boolean isTopicMessage, boolean containsUnreadMention, int date, int editDate, TdApi.MessageForwardInfo forwardInfo, TdApi.MessageInteractionInfo interactionInfo, TdApi.UnreadReaction[] unreadReactions, long replyInChatId, long replyToMessageId, long messageThreadId, int selfDestructTime, double selfDestructIn, double autoDeleteIn, long viaBotUserId, String authorSignature, long mediaAlbumId, String restrictionReason, TdApi.MessageContent content, TdApi.ReplyMarkup replyMarkup)
    Describes a message.
    Describes a message.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    Returns an identifier uniquely determining type of the object.
    int
     
    void
    Serialize the TDLib class

    Methods inherited from class it.tdlight.jni.TdApi.Object

    serialize, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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.
    • canGetAddedReactions

      public boolean canGetAddedReactions
      True, if the list of added reactions is available through getMessageAddedReactions.
    • canGetStatistics

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

      public boolean canGetMessageThread
      True, if information about the message thread is available through getMessageThread and getMessageThreadHistory.
    • canGetViewers

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

      public boolean canReportReactions
      True, if reactions on the message can be reported through reportMessageReactions.
    • 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.
    • isTopicMessage

      public boolean isTopicMessage
      True, if the message is a forum topic message.
    • 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.
    • unreadReactions

      public TdApi.UnreadReaction[] unreadReactions
      Information about unread reactions added to the message.
    • 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.
    • selfDestructTime

      public int selfDestructTime
      The message's self-destruct time, in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the time expires.
    • selfDestructIn

      public double selfDestructIn
      Time left before the message self-destruct timer expires, in seconds. If the self-destruct timer isn't started yet, equals to the value of the selfDestructTime field.
    • autoDeleteIn

      public double autoDeleteIn
      Time left before the message will be automatically deleted by messageAutoDeleteTime setting of the chat, in seconds; 0 if never. TDLib will send updateDeleteMessages or updateMessageContent once the time expires.
    • 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
      Identifier uniquely determining type of the object.
      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 canGetAddedReactions, boolean canGetStatistics, boolean canGetMessageThread, boolean canGetViewers, boolean canGetMediaTimestampLinks, boolean canReportReactions, boolean hasTimestampedMedia, boolean isChannelPost, boolean isTopicMessage, boolean containsUnreadMention, int date, int editDate, TdApi.MessageForwardInfo forwardInfo, TdApi.MessageInteractionInfo interactionInfo, TdApi.UnreadReaction[] unreadReactions, long replyInChatId, long replyToMessageId, long messageThreadId, int selfDestructTime, double selfDestructIn, double autoDeleteIn, long viaBotUserId, String authorSignature, long mediaAlbumId, String restrictionReason, TdApi.MessageContent content, TdApi.ReplyMarkup replyMarkup)
      Describes a message.
      Parameters:
      id - Message identifier; unique for the chat to which the message belongs.
      senderId - Identifier of the sender of the message.
      chatId - Chat identifier.
      sendingState - The sending state of the message; may be null.
      schedulingState - The scheduling state of the message; may be null.
      isOutgoing - True, if the message is outgoing.
      isPinned - True, if the message is pinned.
      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 - True, if the message can be forwarded.
      canBeSaved - True, if content of the message can be saved locally or copied.
      canBeDeletedOnlyForSelf - True, if the message can be deleted only for the current user while other users will continue to see it.
      canBeDeletedForAllUsers - True, if the message can be deleted for all users.
      canGetAddedReactions - True, if the list of added reactions is available through getMessageAddedReactions.
      canGetStatistics - True, if the message statistics are available through getMessageStatistics.
      canGetMessageThread - True, if information about the message thread is available through getMessageThread and getMessageThreadHistory.
      canGetViewers - True, if chat members already viewed the message can be received through getMessageViewers.
      canGetMediaTimestampLinks - True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink.
      canReportReactions - True, if reactions on the message can be reported through reportMessageReactions.
      hasTimestampedMedia - True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message.
      isChannelPost - True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts.
      isTopicMessage - True, if the message is a forum topic message.
      containsUnreadMention - True, if the message contains an unread mention for the current user.
      date - Point in time (Unix timestamp) when the message was sent.
      editDate - Point in time (Unix timestamp) when the message was last edited.
      forwardInfo - Information about the initial message sender; may be null.
      interactionInfo - Information about interactions with the message; may be null.
      unreadReactions - Information about unread reactions added to the message.
      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 - If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message.
      messageThreadId - If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs.
      selfDestructTime - The message's self-destruct time, in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the time expires.
      selfDestructIn - Time left before the message self-destruct timer expires, in seconds. If the self-destruct timer isn't started yet, equals to the value of the selfDestructTime field.
      autoDeleteIn - Time left before the message will be automatically deleted by messageAutoDeleteTime setting of the chat, in seconds; 0 if never. TDLib will send updateDeleteMessages or updateMessageContent once the time expires.
      viaBotUserId - If non-zero, the user identifier of the bot through which this message was sent.
      authorSignature - For channel posts and anonymous group messages, optional author signature.
      mediaAlbumId - Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums.
      restrictionReason - If non-empty, contains a human-readable description of the reason why access to this message must be restricted.
      content - Content of the message.
      replyMarkup - Reply markup for the message; may be null.
    • Message

      public Message(DataInput input) throws IOException
      Describes a message.
      Parameters:
      input - Serialized input
      Throws:
      IOException - the deserialization failed
  • Method Details

    • getConstructor

      public int getConstructor()
      Description copied from class: TdApi.Object
      Returns an identifier uniquely determining type of the object.
      Specified by:
      getConstructor in class TdApi.Object
      Returns:
      this.CONSTRUCTOR
    • serialize

      public void serialize(DataOutput output) throws IOException
      Serialize the TDLib class
      Specified by:
      serialize in class TdApi.Object
      Parameters:
      output - output data stream
      Throws:
      IOException - the serialization failed
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object