aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/lnurl.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/routes/lnurl.ts b/routes/lnurl.ts
index 0358488e..4810bf3c 100644
--- a/routes/lnurl.ts
+++ b/routes/lnurl.ts
@@ -108,9 +108,8 @@ export default {
let { username } = user;
username = username.replace(/\s/g, "").toLowerCase();
- const memo = comment ?? `Paying ${username}@${host}`;
let metadata = JSON.stringify([
- ["text/plain", memo],
+ ["text/plain", `Paying ${username}@${host}`],
["text/identifier", `${username}@${host}`],
]);
@@ -136,6 +135,11 @@ export default {
user,
});
+ if (comment) {
+ invoice.memo = comment;
+ await s(`invoice:${invoice.id}`, invoice);
+ }
+
res.send({
pr: invoice.text,
routes: [],