Skip to main content

Update Report Status

To update the status of pending posts, use the updateReportStatus function. This function allows moderators to change the status of reported posts.

Steps to Update Report Status

  1. Use the updateReportStatus() function provided by the lmFeedClient object.
  2. Create an instance of UpdateReportStatusRequest, as shown in the snippet, and pass it to the above method.
  3. Use the response as per your requirement.
import UpdateReportStatusRequest from "../requests/UpdateReportStatusRequest";

try {
const updateReportStatusRequest =
UpdateReportStatusRequest.builder()
.setReportIds(reportIds) // Array of report IDs
.setActionTaken(actionTaken) // Action to take on the reports
.build();
const response = await lmFeedClient.updateReportStatus(
updateReportStatusRequest
);
// Use the response as per your requirement.
} catch (error) {
// Handle the error as per your requirement.
}

Models

UpdateReportStatusRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
reportIdsnumber[]Array of report IDs
actionTakenLMFeedReportStatusAction to take

LMFeedReportStatus

VARIABLEVALUE
EDIT_MEMBER_PERMISSION0
PENDING_POST_APPROVED7
PENDING_POST_REJECTED8
POST_APPROVED9
POST_REJECTED10
COMMENT_APPROVED11
COMMENT_REJECTED12