Files
us.proxy.sune.chat/notify.js
2026-02-18 14:31:48 -08:00

16 lines
340 B
JavaScript

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))
}