diff options
| -rw-r--r-- | lib/payments.ts | 2 | ||||
| -rw-r--r-- | routes/users.ts | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/payments.ts b/lib/payments.ts index bc19dae9..e3a2e0de 100644 --- a/lib/payments.ts +++ b/lib/payments.ts @@ -120,7 +120,7 @@ export const debit = async ({ : 0; if (aid && aid !== uid) ourfee = 0; - const frozenBalance = whitelisted ? 0 : await ga(`balance:${uid}`); + const frozenBalance = (!blacklisted || whitelisted) ? 0 : await ga(`balance:${uid}`); ourfee = await db.debit( `balance:${aid || uid}`, diff --git a/routes/users.ts b/routes/users.ts index 189d6f05..e39b3337 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -35,11 +35,17 @@ export default { user.locked = await ga(`balance:${user.id}`); if (user.locked) { + const blacklisted = await db.sIsMember( + "blacklist", + user?.username?.toLowerCase().trim(), + ); + const whitelisted = await db.sIsMember( "whitelist", user?.username?.toLowerCase().trim(), ); - if (whitelisted) user.locked = 0; + + if (!blacklisted || whitelisted) user.locked = 0; } user.prompt = !!user.prompt; |
