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 Summary
FieldsModifier and TypeFieldDescriptionprivate final ButtonActionLink
Action linkprivate final byte[]
Conversation dataprivate final int
Conversation delay in endTimeStampprivate final String
Conversation sourceprivate final ChatDisappear
Disappearing modeprivate final String
Entry point conversion appprivate final int
Entry point conversion delay in endTimeStampprivate final String
Entry point conversion sourceprivate int
The expiration in seconds for this ContextualMessage.private long
The timestampSeconds, that is the seconds in seconds sinceInstant.EPOCH
, of the last modification to the ephemeral settings for the chat where this ContextualMessage was sent.private final byte[]
Ephemeral shared secretprivate final ExternalAdReplyInfo
External ad replyprivate final boolean
Whether this ContextualMessage is forwardedprivate final int
Forwarding scoreprivate final String
Group subjectA list of the contacts' jids mentioned in this ContextualMessageprivate final Jid
Parent groupprivate final ChatMessageKey
Placeholder keyprivate final AdReplyInfo
The ad that this ContextualMessage quotesprivate final MessageContainer
The message container that this ContextualMessage quotesprivate Chat
The contact that sent the message that this ContextualMessage quotesprivate final Jid
The jid of the contact that sent the message that this ContextualMessage quotesprivate final String
The jid of the message that this ContextualMessage quotesprivate Contact
The contact that sent the message that this ContextualMessage quotesprivate final Jid
The jid of the contact that sent the message that this ContextualMessage quotesprivate final int
Trust banner actionprivate final String
Trust banner type -
Constructor Summary
ConstructorsConstructorDescriptionContextInfo
(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 Summary
Modifier and TypeMethodDescriptionOptional
<byte[]> int
static ContextInfo
empty()
int
int
long
Optional
<byte[]> boolean
int
boolean
Returns whether this context info has information about a quoted messagementions()
static ContextInfo
of
(MessageInfo quotedMessage) quotedAd()
Returns the quoted messageReturns the chat of the quoted messageReturns the chat jid of the quoted messageReturns the id of the quoted messageReturns the sender of the quoted messageReturns the jid of the sender of the quoted messagesetEphemeralExpiration
(int ephemeralExpiration) setEphemeralSettingTimestamp
(long ephemeralSettingTimestamp) setQuotedMessageChat
(Chat quotedMessageChat) setQuotedMessageSender
(Contact quotedMessageSender) int
-
Field Details
-
quotedMessageId
The jid of the message that this ContextualMessage quotes -
quotedMessageSenderJid
The jid of the contact that sent the message that this ContextualMessage quotes -
quotedMessage
The message container that this ContextualMessage quotes -
quotedMessageChatJid
The jid of the contact that sent the message that this ContextualMessage quotes -
mentions
A list of the contacts' jids mentioned in this ContextualMessage -
conversionSource
Conversation source -
conversionData
private final byte[] conversionDataConversation data -
conversionDelaySeconds
private final int conversionDelaySecondsConversation delay in endTimeStamp -
forwardingScore
private final int forwardingScoreForwarding score -
forwarded
private final boolean forwardedWhether this ContextualMessage is forwarded -
quotedAd
The ad that this ContextualMessage quotes -
placeholderKey
Placeholder key -
ephemeralExpiration
private int ephemeralExpirationThe expiration in seconds for this ContextualMessage. Only valid if the chat where this message was sent is ephemeral. -
ephemeralSettingTimestamp
private long ephemeralSettingTimestampThe timestampSeconds, that is the seconds in seconds sinceInstant.EPOCH
, of the last modification to the ephemeral settings for the chat where this ContextualMessage was sent. -
externalAdReply
External ad reply -
entryPointConversionSource
Entry point conversion source -
entryPointConversionApp
Entry point conversion app -
entryPointConversionDelaySeconds
private final int entryPointConversionDelaySecondsEntry point conversion delay in endTimeStamp -
disappearingMode
Disappearing mode -
actionLink
Action link -
groupSubject
Group subject -
parentGroup
Parent group -
trustBannerType
Trust banner type -
trustBannerAction
private final int trustBannerActionTrust banner action -
quotedMessageSender
The contact that sent the message that this ContextualMessage quotes -
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
-
empty
-
quotedMessageSender
Returns the sender of the quoted message- Returns:
- an optional
-
setQuotedMessageSender
-
quotedMessageChatJid
Returns the chat jid of the quoted message- Returns:
- an optional
-
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
Returns the id of the quoted message- Returns:
- an optional
-
quotedMessage
Returns the quoted message- Returns:
- an optional
-
quotedMessageChat
Returns the chat of the quoted message- Returns:
- an optional
-
setQuotedMessageChat
-
mentions
-
conversionSource
-
conversionData
-
conversionDelaySeconds
public int conversionDelaySeconds() -
forwardingScore
public int forwardingScore() -
forwarded
public boolean forwarded() -
quotedAd
-
placeholderKey
-
ephemeralExpiration
public int ephemeralExpiration() -
setEphemeralExpiration
-
ephemeralSettingTimestamp
public long ephemeralSettingTimestamp() -
setEphemeralSettingTimestamp
-
externalAdReply
-
entryPointConversionSource
-
entryPointConversionApp
-
entryPointConversionDelaySeconds
public int entryPointConversionDelaySeconds() -
disappearingMode
-
actionLink
-
groupSubject
-
parentGroup
-
trustBannerType
-
trustBannerAction
public int trustBannerAction()
-