onCommentUnvoted( )


A backend event that fires when a vote is removed from a forum comment.

The onCommentUnvoted() event handler runs when a vote is removed from a forum comment. The received UnvotedComment object contains information about the comment that was unvoted.

Notes:

  • Only comments on posts with a postType of "QUESTION" can be voted on.

  • Backend events are not fired when previewing your site.

Method Declaration
Copy
function onCommentUnvoted(event: UnvotedComment): void;
Method Parameters
eventUnvotedCommentRequired

Information about the forum comment that was upvoted.

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

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

Did this help?