aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-07 23:08:32 -0800
committerAdam Soltys <[email protected]>2023-12-07 23:08:32 -0800
commit17cf1c5dc76c1c566a34f3e687c3b5e3ef423862 (patch)
tree3baa5ca8786e21af1768d8eb7dd1e5f4faa621a1 /lib/payments.js
parent602f509706493585e35ed0cdce3e47debd312445 (diff)
downloadcoinos-server-17cf1c5dc76c1c566a34f3e687c3b5e3ef423862.tar.gz
coinos-server-17cf1c5dc76c1c566a34f3e687c3b5e3ef423862.zip
notify flag
Diffstat (limited to 'lib/payments.js')
-rw-r--r--lib/payments.js4
1 files changed, 2 insertions, 2 deletions
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(