Class ContextInfo

java.lang.Object
it.auties.whatsapp.model.info.ContextInfo
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject, Info

public final class ContextInfo extends Object implements Info, it.auties.protobuf.model.ProtobufMessage
A model class that holds the information related to a ContextualMessage.
  • Field Details

    • quotedMessageId

      private final String quotedMessageId
      The jid of the message that this ContextualMessage quotes
    • quotedMessageSenderJid

      private final Jid quotedMessageSenderJid
      The jid of the contact that sent the message that this ContextualMessage quotes
    • quotedMessage

      private final MessageContainer quotedMessage
      The message container that this ContextualMessage quotes
    • quotedMessageChatJid

      private final Jid quotedMessageChatJid
      The jid of the contact that sent the message that this ContextualMessage quotes
    • mentions

      private final List<Jid> mentions
      A list of the contacts' jids mentioned in this ContextualMessage
    • conversionSource

      private final String conversionSource
      Conversation source
    • conversionData

      private final byte[] conversionData
      Conversation data
    • conversionDelaySeconds

      private final int conversionDelaySeconds
      Conversation delay in endTimeStamp
    • forwardingScore

      private final int forwardingScore
      Forwarding score
    • forwarded

      private final boolean forwarded
      Whether this ContextualMessage is forwarded
    • quotedAd

      private final AdReplyInfo quotedAd
      The ad that this ContextualMessage quotes
    • placeholderKey

      private final ChatMessageKey placeholderKey
      Placeholder key
    • ephemeralExpiration

      private int ephemeralExpiration
      The expiration in seconds for this ContextualMessage. Only valid if the chat where this message was sent is ephemeral.
    • ephemeralSettingTimestamp

      private long ephemeralSettingTimestamp
      The timestampSeconds, that is the seconds in seconds since Instant.EPOCH, of the last modification to the ephemeral settings for the chat where this ContextualMessage was sent.
    • ephemeralSharedSecret

      private final byte[] ephemeralSharedSecret
      Ephemeral shared secret
    • externalAdReply

      private final ExternalAdReplyInfo externalAdReply
      External ad reply
    • entryPointConversionSource

      private final String entryPointConversionSource
      Entry point conversion source
    • entryPointConversionApp

      private final String entryPointConversionApp
      Entry point conversion app
    • entryPointConversionDelaySeconds

      private final int entryPointConversionDelaySeconds
      Entry point conversion delay in endTimeStamp
    • disappearingMode

      private final ChatDisappear disappearingMode
      Disappearing mode
    • groupSubject

      private final String groupSubject
      Group subject
    • parentGroup

      private final Jid parentGroup
      Parent group
    • trustBannerType

      private final String trustBannerType
      Trust banner type
    • trustBannerAction

      private final int trustBannerAction
      Trust banner action
    • quotedMessageSender

      private Contact quotedMessageSender
      The contact that sent the message that this ContextualMessage quotes
    • quotedMessageChat

      private Chat quotedMessageChat
      The contact that sent the message that this ContextualMessage quotes
  • Constructor Details

    • ContextInfo

      public ContextInfo(String quotedMessageId, Jid quotedMessageSenderJid, MessageContainer quotedMessage, Jid quotedMessageChatJid, List<Jid> mentions, String conversionSource, byte[] conversionData, int conversionDelaySeconds, int forwardingScore, boolean forwarded, AdReplyInfo quotedAd, ChatMessageKey placeholderKey, int ephemeralExpiration, long ephemeralSettingTimestamp, byte[] ephemeralSharedSecret, ExternalAdReplyInfo externalAdReply, String entryPointConversionSource, String entryPointConversionApp, int entryPointConversionDelaySeconds, ChatDisappear disappearingMode, ButtonActionLink actionLink, String groupSubject, Jid parentGroup, String trustBannerType, int trustBannerAction)
  • Method Details

    • of

      public static ContextInfo of(MessageInfo quotedMessage)
    • empty

      public static ContextInfo empty()
    • quotedMessageSender

      public Optional<Contact> quotedMessageSender()
      Returns the sender of the quoted message
      Returns:
      an optional
    • setQuotedMessageSender

      public ContextInfo setQuotedMessageSender(Contact quotedMessageSender)
    • quotedMessageChatJid

      public Optional<Jid> quotedMessageChatJid()
      Returns the chat jid of the quoted message
      Returns:
      an optional
    • quotedMessageSenderJid

      public Optional<Jid> quotedMessageSenderJid()
      Returns the jid of the sender of the quoted message
      Returns:
      an optional
    • hasQuotedMessage

      public boolean hasQuotedMessage()
      Returns whether this context info has information about a quoted message
      Returns:
      a boolean
    • quotedMessageId

      public Optional<String> quotedMessageId()
      Returns the id of the quoted message
      Returns:
      an optional
    • quotedMessage

      public Optional<MessageContainer> quotedMessage()
      Returns the quoted message
      Returns:
      an optional
    • quotedMessageChat

      public Optional<Chat> quotedMessageChat()
      Returns the chat of the quoted message
      Returns:
      an optional
    • setQuotedMessageChat

      public ContextInfo setQuotedMessageChat(Chat quotedMessageChat)
    • mentions

      public List<Jid> mentions()
    • conversionSource

      public Optional<String> conversionSource()
    • conversionData

      public Optional<byte[]> conversionData()
    • conversionDelaySeconds

      public int conversionDelaySeconds()
    • forwardingScore

      public int forwardingScore()
    • forwarded

      public boolean forwarded()
    • quotedAd

      public Optional<AdReplyInfo> quotedAd()
    • placeholderKey

      public Optional<ChatMessageKey> placeholderKey()
    • ephemeralExpiration

      public int ephemeralExpiration()
    • setEphemeralExpiration

      public ContextInfo setEphemeralExpiration(int ephemeralExpiration)
    • ephemeralSettingTimestamp

      public long ephemeralSettingTimestamp()
    • setEphemeralSettingTimestamp

      public ContextInfo setEphemeralSettingTimestamp(long ephemeralSettingTimestamp)
    • ephemeralSharedSecret

      public Optional<byte[]> ephemeralSharedSecret()
    • externalAdReply

      public Optional<ExternalAdReplyInfo> externalAdReply()
    • entryPointConversionSource

      public Optional<String> entryPointConversionSource()
    • entryPointConversionApp

      public Optional<String> entryPointConversionApp()
    • entryPointConversionDelaySeconds

      public int entryPointConversionDelaySeconds()
    • disappearingMode

      public Optional<ChatDisappear> disappearingMode()
    • actionLink

      public Optional<ButtonActionLink> actionLink()
    • groupSubject

      public Optional<String> groupSubject()
    • parentGroup

      public Optional<Jid> parentGroup()
    • trustBannerType

      public Optional<String> trustBannerType()
    • trustBannerAction

      public int trustBannerAction()