mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-09 16:52:13 +01:00
Verify old submissions right after someone votes on it
This commit is contained in:
parent
59373cf346
commit
803fc18554
1 changed files with 7 additions and 0 deletions
|
@ -253,6 +253,13 @@ async function updateVoteTotals(type: BrandingType, UUID: BrandingUUID, userID:
|
|||
}
|
||||
} else {
|
||||
await db.prepare("run", `UPDATE ${table} SET "votes" = "votes" + 1 WHERE "UUID" = ?`, [UUID]);
|
||||
|
||||
if (type === BrandingType.Title) {
|
||||
const votedSubmitterUserID = (await db.prepare("get", `SELECT "userID" FROM ${table2} WHERE "UUID" = ?`, [UUID]))?.userID;
|
||||
if (votedSubmitterUserID) {
|
||||
await verifyOldSubmissions(votedSubmitterUserID, await getVerificationValue(votedSubmitterUserID, await isUserVIP(votedSubmitterUserID)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldLock) {
|
||||
|
|
Loading…
Reference in a new issue