Delete Reaction
You can integrate "remove reaction" which enables your user to remove their reaction from already reacted chat messages. You can do so by following the given steps.
Steps to Delete Reaction in a Conversation
- Create an object of the
DeleteReactionRequest
class using theDeleteReactionRequestBuilder
class. - Call
deleteReaction()
present in theLMChatClient
class using your request object. - Process the response LMResponse<void> as per your requirement.
DeleteReactionRequest request = (DeleteReactionRequestBuilder()
..conversationId("ENTER_CONVERSATION_ID")
..reaction("ENTER_REACTION"))
.build();
LMResponse<void> response = await lmChatClient.deleteReaction(request);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response.errorMessage);
}
Models
DeleteReactionRequest
List of parameters for the DeleteReactionRequest
class
Variable | Type | Description | Optional |
---|---|---|---|
conversationId | int | Conversation ID | |
reaction | String | Reaction |