onCommentReported( )


A backend event that fires when a forum comment is reported.

The onCommentReported() event handler runs when a site visitor reports a comment on your site. The received ReportedComment object contains information about the comment that was reported.

Note: Backend events are not fired when previewing your site.

Method Declaration
Copy
function onCommentReported(event: ReportedComment): void;
Method Parameters
eventReportedCommentRequired

Information about the forum comment that was reported.

A backend event that occurs when a forum comment is reported
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onCommentReported(event) { const reportedCommentId = event.commentId; const typeOfReport = event.reportType; console.log("Comment reported"); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?