From f2878d2e9879109a83dc63562d05126489d36cdc Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 6 Dec 2023 22:56:43 -0800 Subject: payment notifications --- lib/payments.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/payments.js') diff --git a/lib/payments.js b/lib/payments.js index 2d0b3330..6ec76650 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -183,7 +183,15 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => { callWebhook(invoice, p); if (user.verified) { - mail(user, "Payment received", templates.paymentReceived, p); + mail(user, "Payment received", templates.paymentReceived, { + username, + sats: + "⚡️" + + new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format( + p.amount + ), + link: `${process.env.URL}/payment/${p.id}` + }); } mqtt1.publish( -- cgit v1.2.3