aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-11-29 11:41:43 -0800
committerAdam Soltys <[email protected]>2023-11-29 11:41:50 -0800
commit8c5835fc2ca21fbe0dfd870d932253f24c995b48 (patch)
treef14721047f8faa18fe33bb9086cfc6676afbd3f1 /lib/payments.js
parentada148934ee075acf41e29592c7ca39868df34eb (diff)
downloadcoinos-server-8c5835fc2ca21fbe0dfd870d932253f24c995b48.tar.gz
coinos-server-8c5835fc2ca21fbe0dfd870d932253f24c995b48.zip
mail helper
Diffstat (limited to 'lib/payments.js')
-rw-r--r--lib/payments.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/payments.js b/lib/payments.js
index 098c16f7..510f24e2 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -16,6 +16,7 @@ import EventEmitter from "events";
import crc32 from "buffer-crc32";
import { mqtt1, mqtt2 } from "$lib/mqtt";
import ln from "$lib/ln";
+import { mail, templates } from "$lib/mail";
export const types = {
internal: "internal",
@@ -98,6 +99,9 @@ export let debit = async (
l("sent", type, user.username, amount);
emit(user.id, "payment", p);
+ mail(user, "Payment sent", templates.paymentSent, {
+ username: user.username
+ });
return p;
};