aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lnurl.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-04 13:38:24 -0700
committerAdam Soltys <[email protected]>2026-10-04 13:38:24 -0700
commit41018c30a2e03f5ab05be64d419542be0cff7943 (patch)
tree71035492551fd360aa48e90143403a129e9f80f5 /routes/lnurl.ts
parent1ff2623dbb43148267eac5cbe68c76d2c0639805 (diff)
downloadcoinos-server-41018c30a2e03f5ab05be64d419542be0cff7943.tar.gz
coinos-server-41018c30a2e03f5ab05be64d419542be0cff7943.zip
Evicted accounts can't receive or log in; limit errors say what's happening
An evicted account no longer gets lightning-address invoices (stops a scam page's address from minting new ones) or a login token. A send over the server limit now says withdrawals are temporarily limited instead of a generic "Problem sending payment" that read as a frozen account. (Already live since the 2026-10-01 restart.) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011bvzKaZosXGHkigcGcSzAR
Diffstat (limited to 'routes/lnurl.ts')
-rw-r--r--routes/lnurl.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/routes/lnurl.ts b/routes/lnurl.ts
index 0472d758..7f04db5d 100644
--- a/routes/lnurl.ts
+++ b/routes/lnurl.ts
@@ -138,7 +138,10 @@ export default {
if (v3) return res.send(v3);
const user = await getUser(name);
- if (!user) fail(`User ${username} not found`);
+ // Evicted accounts can't receive either: stops a lightning address that
+ // a scam page points victims at from issuing new invoices.
+ if (!user || (await db.sIsMember("evicted", user.id)))
+ fail(`User ${username} not found`);
const { id: uid } = user;
const metadata = JSON.stringify([
@@ -179,7 +182,8 @@ export default {
const uid = await g(`lnurl:${id}`);
const user = await getUser(uid);
- if (!user) fail("user not found");
+ if (!user || (await db.sIsMember("evicted", user.id)))
+ fail("user not found");
let { username } = user;
username = username.replace(/\s/g, "").toLowerCase();