Add seperate type for dearrow warning

Also add dearrow warning reason as option for user info
This commit is contained in:
Ajay
2023-07-17 22:42:29 -04:00
parent 808066a5ed
commit e9fcf6b445
7 changed files with 31 additions and 7 deletions

View File

@@ -366,7 +366,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID
const MILLISECONDS_IN_HOUR = 3600000;
const now = Date.now();
const warnings = (await db.prepare("all", `SELECT "reason" FROM warnings WHERE "userID" = ? AND "issueTime" > ? AND enabled = 1`,
const warnings = (await db.prepare("all", `SELECT "reason" FROM warnings WHERE "userID" = ? AND "issueTime" > ? AND enabled = 1 AND type = 0`,
[nonAnonUserID, Math.floor(now - (config.hoursAfterWarningExpires * MILLISECONDS_IN_HOUR))],
));