mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
Merge pull request #146 from ajayyy/testing
Don't send webhooks for duplicate votes
This commit is contained in:
commit
abc91cc7a5
1 changed files with 13 additions and 11 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue