mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 12:07:07 +03:00
Verify old submissions right after someone votes on it
This commit is contained in:
@@ -253,6 +253,13 @@ async function updateVoteTotals(type: BrandingType, UUID: BrandingUUID, userID:
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await db.prepare("run", `UPDATE ${table} SET "votes" = "votes" + 1 WHERE "UUID" = ?`, [UUID]);
|
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) {
|
if (shouldLock) {
|
||||||
|
|||||||
Reference in New Issue
Block a user