From 17cf1c5dc76c1c566a34f3e687c3b5e3ef423862 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 7 Dec 2023 23:08:32 -0800 Subject: notify flag --- lib/payments.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/payments.js') diff --git a/lib/payments.js b/lib/payments.js index 2220395a..14bdf7ae 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -182,7 +182,7 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => { notify(user, `Received ${amount} sats`); callWebhook(invoice, p); - if (user.verified) { + if (user.verified && user.notify) { mail(user, "Payment received", templates.paymentReceived, { username, sats: @@ -191,7 +191,7 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => { p.amount ), link: `${process.env.URL}/payment/${p.id}` - }); + }); } mqtt1.publish( -- cgit v1.2.3