client.message.send accepts a family of typed interactive content objects. Each is discriminated by its type field.
Targeting a message
Reply / reaction / revoke / pin / keep / event-response all accept aWaMessageTargetInput: either a received message event passed verbatim (its key is used) or an explicit WaMessageKey:
event.key is already a WaMessageKey:
Reactions
emoji to remove a previous reaction:
Polls
{ name } objects. Order matters β it is used for vote hashing.
Voting on a poll
Voting requires the original pollβs identity and itsmessageSecret (32 bytes from the pollβs messageContextInfo.messageSecret):
Incoming votes arrive as
message_addon events once decrypted.Editing a message
To edit, send the new content and passeditKey in the options. The original must be fromMe. You can pass the received message event verbatim, its key, or an explicit WaSendEditKey ({ id, participant?, timestampMs? }):
MESSAGE_EDIT protocol message targeting editKey.id.
Revoking (delete for everyone)
target.fromMe: false triggers an admin revoke. There is no subtype option to pass.
Pinning
durationSecs to override the default. wa-web offers three presets:
86_400 (24h). The TTL travels with the pin via messageContextInfo.messageAddOnDurationInSecs; without it receiving clients silently drop the pin, so the lib always stamps the default when you omit it. durationSecs is ignored on unpin.
Keep-in-chat
For disappearing-message chats, keep (or un-keep) a specific message:Events
Create a calendar-style event message:Responding to an event
Locations & contacts
There is no dedicated builder for static locations or contact cards yet β send them as a rawProto.IMessage:
