Don't send webhooks for duplicate votes

This commit is contained in:
Ajay Ramachandran
2020-09-16 09:30:26 -04:00
parent a7933c925b
commit 211562a0d6

View File

@@ -355,17 +355,19 @@ async function voteOnSponsorTime(req, res) {
res.sendStatus(200);
sendWebhooks({
UUID,
nonAnonUserID,
voteTypeEnum,
isVIP,
isOwnSubmission,
row,
category,
incrementAmount,
oldIncrementAmount
});
if (incrementAmount - oldIncrementAmount !== 0) {
sendWebhooks({
UUID,
nonAnonUserID,
voteTypeEnum,
isVIP,
isOwnSubmission,
row,
category,
incrementAmount,
oldIncrementAmount
});
}
} catch (err) {
logger.error(err);