aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/lnurl.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/lnurl.ts b/routes/lnurl.ts
index 69f25ddb..8dcda8b2 100644
--- a/routes/lnurl.ts
+++ b/routes/lnurl.ts
@@ -53,7 +53,9 @@ export default {
query: { minSendable = 1000, maxSendable = 100000000000 },
} = req;
try {
- const { id: uid } = await getUser(username);
+ const { id: uid } = await getUser(
+ username.replace("lightning:", "").replace(/\s/, "").toLowerCase(),
+ );
const metadata = JSON.stringify([
["text/plain", `Paying ${username}@${host}`],