Skip to main content

Put Reaction

Reactions are used to add context to a message, such as by indicating that the user agree or disagree with something that was said. You can integrate reactions to react to chat messages and enable your users to react to these messages by following the given steps

Steps to Put Reaction from a Conversation

  1. To post a conversation, use the putReaction() method provided by the client you initialised.
  2. Pass the required parameters conversationId and reaction.
  3. Process the response as per your requirement.
const payload = {
conversationId: 76766,
reaction: "😂",
};

const response = await lmChatClient?.putReaction(payload);

if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}

Models

PutReactionRequest

List of parameters for the PutReactionRequest class

VariableTypeDescriptionOptional
chatroomIdnumberChatroom Id✔️
conversationIdnumberConversation Id
reactionstringReaction

PutReactionResponse

List of parameters for the PutReactionResponse class

VariableTypeDescriptionOptional
successbooleanAPI success status
errorMessagestring?Error message in case of failure✔️