From bce5385864bb60b3ed5d8ec994d6b72438429ef5 Mon Sep 17 00:00:00 2001 From: mini-bomba <55105495+mini-bomba@users.noreply.github.com> Date: Mon, 26 May 2025 16:41:55 +0200 Subject: [PATCH] shortcircuit the new user check for banned users --- src/routes/postBranding.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/routes/postBranding.ts b/src/routes/postBranding.ts index b07fc24..3f5ef35 100644 --- a/src/routes/postBranding.ts +++ b/src/routes/postBranding.ts @@ -80,7 +80,13 @@ export async function postBranding(req: Request, res: Response) { return; } - const permission = await canSubmitDeArrow(hashedUserID); + // treat banned users as existing users who "can submit" for the purposes of these checks + // this is to avoid their titles from being logged and them taking up "new user" slots with every submission + const permission = isBanned ? { + canSubmit: true, + newUser: false, + reason: "", + } : await canSubmitDeArrow(hashedUserID); if (!permission.canSubmit) { Logger.warn(`New user trying to submit dearrow: ${hashedUserID} ${videoID} ${videoDuration} ${Object.keys(req.body)} ${userAgent} ${title?.title} ${req.headers["user-agent"]}`);