Class: Reaction
Defined in: WAProto/index.d.ts:37688
Represents a Reaction.
Implements
Constructors
new Reaction()
new Reaction(
properties
?):Reaction
Defined in: WAProto/index.d.ts:37694
Constructs a new Reaction.
Parameters
properties?
Properties to set
Returns
Properties
groupingKey?
optional
groupingKey:null
|string
Defined in: WAProto/index.d.ts:37703
Reaction groupingKey.
Implementation of
key?
optional
key:null
|IMessageKey
Defined in: WAProto/index.d.ts:37697
Reaction key.
Implementation of
senderTimestampMs?
optional
senderTimestampMs:null
|number
|Long
Defined in: WAProto/index.d.ts:37706
Reaction senderTimestampMs.
Implementation of
text?
optional
text:null
|string
Defined in: WAProto/index.d.ts:37700
Reaction text.
Implementation of
unread?
optional
unread:null
|boolean
Defined in: WAProto/index.d.ts:37709
Reaction unread.
Implementation of
Methods
toJSON()
toJSON():
object
Defined in: WAProto/index.d.ts:37779
Converts this Reaction to JSON.
Returns
object
JSON object
create()
static
create(properties
?):Reaction
Defined in: WAProto/index.d.ts:37716
Creates a new Reaction instance using the specified properties.
Parameters
properties?
Properties to set
Returns
Reaction instance
decode()
static
decode(reader
,length
?):Reaction
Defined in: WAProto/index.d.ts:37742
Decodes a Reaction message from the specified reader or buffer.
Parameters
reader
Reader or buffer to decode from
Uint8Array
<ArrayBufferLike
> | Reader
length?
number
Message length if known beforehand
Returns
Reaction
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
static
decodeDelimited(reader
):Reaction
Defined in: WAProto/index.d.ts:37751
Decodes a Reaction message from the specified reader or buffer, length delimited.
Parameters
reader
Reader or buffer to decode from
Uint8Array
<ArrayBufferLike
> | Reader
Returns
Reaction
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode()
static
encode(message
,writer
?):Writer
Defined in: WAProto/index.d.ts:37724
Encodes the specified Reaction message. Does not implicitly verify messages.
Parameters
message
Reaction message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
static
encodeDelimited(message
,writer
?):Writer
Defined in: WAProto/index.d.ts:37732
Encodes the specified Reaction message, length delimited. Does not implicitly verify messages.
Parameters
message
Reaction message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
static
fromObject(object
):Reaction
Defined in: WAProto/index.d.ts:37765
Creates a Reaction message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
Reaction
getTypeUrl()
static
getTypeUrl(typeUrlPrefix
?):string
Defined in: WAProto/index.d.ts:37786
Gets the default type url for Reaction
Parameters
typeUrlPrefix?
string
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
string
The default type url
toObject()
static
toObject(message
,options
?):object
Defined in: WAProto/index.d.ts:37773
Creates a plain object from a Reaction message. Also converts values to other types if specified.
Parameters
message
Reaction
options?
IConversionOptions
Conversion options
Returns
object
Plain object
verify()
static
verify(message
):null
|string
Defined in: WAProto/index.d.ts:37758
Verifies a Reaction message.
Parameters
message
Plain object to verify
Returns
null
| string
null
if valid, otherwise the reason why it is not