Class TextMessage

java.lang.Object
ch.threema.apitool.messages.ThreemaMessage
ch.threema.apitool.messages.TextMessage

@Generated(value="msgapi-sdk-codegen", date="2024-03-15T13:44:24.473407065+00:00") public class TextMessage extends ThreemaMessage
A text message that can be sent/received with end-to-end encryption via Threema.
  • Field Details

  • Constructor Details

    • TextMessage

      public TextMessage(String text)
  • Method Details

    • getText

      public String getText()
      The message text
      Returns:
      text
    • IsQuote

      public boolean IsQuote()
      Whether or not the message is a quote
      Returns:
      Whether or not the message is a quote
    • getQuotedMessageId

      public String getQuotedMessageId()
      Gets quoted message id if the message is a quote
      Returns:
      Quoted message id
    • getQuoteText

      public String getQuoteText()
      Gets quote text if the message is a quote
      Returns:
      Quote text
    • getTypeCode

      public int getTypeCode()
      Specified by:
      getTypeCode in class ThreemaMessage
      Returns:
      the message's type code
    • getData

      public byte[] getData() throws BadMessageException
      Specified by:
      getData in class ThreemaMessage
      Returns:
      The message's raw content
      Throws:
      BadMessageException
    • fromString

      public static TextMessage fromString(byte[] data, int realDataLength) throws BadMessageException
      Throws:
      BadMessageException
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object