From fdc3cd5ec694928c370a6f545a911fab34273789 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 8 Mar 2025 11:26:20 -0800 Subject: log notifications --- lib/notifications.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/notifications.ts b/lib/notifications.ts index 5d602291..0c890c07 100644 --- a/lib/notifications.ts +++ b/lib/notifications.ts @@ -1,7 +1,7 @@ import config from "$config"; import { db } from "$lib/db"; import ln from "$lib/ln"; -import { err, warn } from "$lib/logging"; +import { err, l, warn } from "$lib/logging"; import { mail, templates } from "$lib/mail"; import mqtt from "$lib/mqtt"; import { publish, serverSecret } from "$lib/nostr"; @@ -87,6 +87,7 @@ export const nwcNotify = async (p) => { let payment_hash = ""; if (p.type === "lightning") ({ payment_hash } = await ln.decode(p.hash)); for (const pubkey of pubkeys) { + l("notifying", pubkey, p.type, p.amount); const notification = { type: p.amount > 0 ? "incoming" : "outgoing", invoice: p.hash, @@ -119,6 +120,7 @@ export const nwcNotify = async (p) => { } } } catch (e) { + console.log(e); warn("nwc notification failed", e.message); } }; -- cgit v1.2.3