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 ButtonActionLinkAction linkprivate final byte[]Conversation dataprivate final intConversation delay in endTimeStampprivate final StringConversation sourceprivate final ChatDisappearDisappearing modeprivate final StringEntry point conversion appprivate final intEntry point conversion delay in endTimeStampprivate final StringEntry point conversion sourceprivate intThe expiration in seconds for this ContextualMessage.private longThe 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 ExternalAdReplyInfoExternal ad replyprivate final booleanWhether this ContextualMessage is forwardedprivate final intForwarding scoreprivate final StringGroup subjectA list of the contacts' jids mentioned in this ContextualMessageprivate final JidParent groupprivate final ChatMessageKeyPlaceholder keyprivate final AdReplyInfoThe ad that this ContextualMessage quotesprivate final MessageContainerThe message container that this ContextualMessage quotesprivate ChatThe contact that sent the message that this ContextualMessage quotesprivate final JidThe jid of the contact that sent the message that this ContextualMessage quotesprivate final StringThe jid of the message that this ContextualMessage quotesprivate ContactThe contact that sent the message that this ContextualMessage quotesprivate final JidThe jid of the contact that sent the message that this ContextualMessage quotesprivate final intTrust banner actionprivate final StringTrust 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[]> intstatic ContextInfoempty()intintlongOptional<byte[]> booleanintbooleanReturns whether this context info has information about a quoted messagementions()static ContextInfoof(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()
-