From 41b7db9c8069b6066bf3df65ac8a99dbfe1f2f4f Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Wed, 18 Feb 2026 13:16:48 -0800 Subject: [PATCH] Feat: Ntfy notification helper --- notify.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 notify.js diff --git a/notify.js b/notify.js new file mode 100644 index 0000000..0c59106 --- /dev/null +++ b/notify.js @@ -0,0 +1,14 @@ +const NTFY_URL = process.env.NTFY_URL || '' + +export function notify(msg, priority = 3, tags = []) { + if (!NTFY_URL) return + fetch(NTFY_URL, { + method: 'POST', + body: msg, + headers: { + Title: 'Sune Proxy', + Priority: `${priority}`, + Tags: tags.join(','), + }, + }).catch(e => console.error('ntfy failed:', e)) +}