Class MessageContent

  • All Implemented Interfaces:

    
    public class MessageContent
    
                        

    Base class for all message content types.

    Specific message types (e.g. TextMessage, ImageMessage) extend this class and add their own properties.

    Inheritance hierarchy:

    MessageContent
    ├── TextMessage
    ├── LocationMessage
    ├── StreamMessage
    └── MediaMessageContent
        ├── ImageMessage
        ├── FileMessage
        ├── VoiceMessage
        ├── GIFMessage
        ├── ShortVideoMessage
        ├── ReferenceMessage
        └── CombineMessage
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      MessageContent()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getExtra() Extra data attached to the message content (sent along with the message, synced remotely).
      final Unit setExtra(String extra) Extra data attached to the message content (sent along with the message, synced remotely).
      final MentionedInfo getMentionedInfo() Mention (@) info.
      final Unit setMentionedInfo(MentionedInfo mentionedInfo) Mention (@) info.
      final Boolean isDestruct() Whether this is a burn-after-reading message.
      final Unit setDestruct(Boolean isDestruct) Whether this is a burn-after-reading message.
      final Long getDestructTime() Auto-destruct duration in seconds after the message is read.
      final Unit setDestructTime(Long destructTime) Auto-destruct duration in seconds after the message is read.
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MessageContent

        MessageContent()
    • Method Detail

      • getExtra

         final String getExtra()

        Extra data attached to the message content (sent along with the message, synced remotely).

      • setExtra

         final Unit setExtra(String extra)

        Extra data attached to the message content (sent along with the message, synced remotely).

      • isDestruct

         final Boolean isDestruct()

        Whether this is a burn-after-reading message.

      • setDestruct

         final Unit setDestruct(Boolean isDestruct)

        Whether this is a burn-after-reading message.

      • getDestructTime

         final Long getDestructTime()

        Auto-destruct duration in seconds after the message is read.

      • setDestructTime

         final Unit setDestructTime(Long destructTime)

        Auto-destruct duration in seconds after the message is read.