Skip to main content

Edit Comment Reply

The editCommentReply() function empowers users to modify their replies to comments, providing a dynamic and interactive user experience. By utilizing this function, developers enable users to update their responses, ensuring the content remains relevant and accurate. The function takes an EditCommentReplyRequest as input, containing the text, postId, commentId, and replyId parameters, and returns an EditCommentReplyResponse as a Future.

Steps to Edit Comment Reply

  1. Create an instance of EditCommentReplyRequest with the required parameters: text, postId, commentId, and replyId.
  2. Call the editCommentReply() function using the instance of the LMFeedClient class, passing the request as a parameter.
  3. Utilize the response as per your application's requirements.
// Create an instance of EditCommentReplyRequest
EditCommentReplyRequest request = (EditCommentReplyRequestBuilder()
..commentId("comment_id")
..text("edited_text")
..postId("post_id")
..replyId("reply_id"))
.build();

// Get the response from calling the function
final EditCommentReplyResponse editReplyResponse = await lmFeedClient.editCommentReply(editReplyRequest);

// Process the response, as per requirement
if (editReplyResponse.success) {
// your function to handle successful edit of comment reply
handleEditCommentReplySuccess(editReplyResponse.reply);
} else {
// your function to handle error message
handleEditCommentReplyError(editReplyResponse.errorMessage);
}

Models

EditCommentReplyRequest

List of parameters for the EditCommentReplyRequest class

VariableTypeDescriptionOptional
textStringEdited reply text
postIdStringPost ID associated with the comment
commentIdStringParent comment ID for the reply
replyIdStringID of the reply to be edited

EditCommentReplyResponse

List of parameters for the EditCommentReplyResponse class

VariableTypeDescriptionOptional
successboolAPI success status
errorMessageStringError message in failure
replyCommentEdited comment reply entity