Skip to main content

Message type - Reaction

Enables reacting by using emoji to a message.

// userAlice.chat.send(recipient, message)
// This section focuses on customization parameters for 'message' object
const aliceMessagesBob = await userAlice.chat.send(recipient, {
type: 'Reaction',
content: '👍', // content can be eliminated
action: 'ThumbsUp', // can be "ThumbsUp", "ThumbsDown", "Heart", "Clap", "Laugh", "Sad", etc
reference: 'bafyreia2okco5ocdxmoxon72erviypaht74u3dqunf3vydu237ybju4kw4', // pass in the reference to the message hash that this reaction is intended for
});

Customization parameters

When sending a message, you can customize the following params

ParamTypeSubtypeDefaultRemarks
recipientstring--Recipient supports a number of address format including wallet address, chain agnostic wallet address, NFT addresses or even chatid which is useful in groups
messageobject--Configuration for message to be sent
-message.typeMetaTextType of message Content
-message.contentstring-Emoji Symbol - 👍, 👎, ❤️, 👏, 😄, 😢
-options.actionstring, choose from ThumbsUp, ThumbsDown, Heart, Clap, Laugh, Sad-Action that is getting applied in the Meta message action
-options.reference{ affected : string[]: arbitrary?: { [key: string]: any } }-Pass in the reference to the message hash that this reaction is intended for

Note: Parameters in this style are mandatory.