mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +03:00
Update user status to include self remove
This commit is contained in:
@@ -224,9 +224,20 @@ async function voteOnSponsorTime(req, res) {
|
|||||||
}
|
}
|
||||||
let isUpvote = incrementAmount > 0;
|
let isUpvote = incrementAmount > 0;
|
||||||
// Send custom webhooks
|
// Send custom webhooks
|
||||||
|
let userStatus;
|
||||||
|
if (isOwnSubmission) {
|
||||||
|
userStatus = "self";
|
||||||
|
} else if (isVIP) {
|
||||||
|
userStatus = "vip";
|
||||||
|
} else if (userSubmissionCountRow.submissionCount === 0) {
|
||||||
|
userStatus = "new";
|
||||||
|
} else {
|
||||||
|
userStatus = "other";
|
||||||
|
}
|
||||||
dispatchWebhooks(isUpvote ? "vote.up" : "vote.down", {
|
dispatchWebhooks(isUpvote ? "vote.up" : "vote.down", {
|
||||||
|
"isOwnSubmission": isOwnSubmission,
|
||||||
"user": {
|
"user": {
|
||||||
"status": userSubmissionCountRow.submissionCount === 0 ? "new" : (isVIP ? "vip" : "normal")
|
"status": userStatus
|
||||||
},
|
},
|
||||||
"video": {
|
"video": {
|
||||||
"id": submissionInfoRow.videoID,
|
"id": submissionInfoRow.videoID,
|
||||||
|
|||||||
Reference in New Issue
Block a user