From 8c5835fc2ca21fbe0dfd870d932253f24c995b48 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 29 Nov 2023 11:41:43 -0800 Subject: mail helper --- lib/payments.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/payments.js') 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; }; -- cgit v1.2.3