From bf7d513ee9733c6e810001b96a7745aaf5556aca Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Tue, 16 Dec 2025 05:53:32 -0800 Subject: [PATCH] Fix: Remove attachments from ntfy notifications --- index.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/index.js b/index.js index 7dff12b..84873e9 100644 --- a/index.js +++ b/index.js @@ -93,18 +93,10 @@ export class MyDurableObject { notify(msg, pri = 3, tags = []) { if (!this.env.NTFY_URL) return; - const attachment = this.getConversationText(); const headers = { Title: 'Sune ORP', Priority: `${pri}`, Tags: tags.join(',') }; - let body = msg; - if (attachment && attachment.length < 1024 * 1024) { - headers.Message = msg; - headers.Filename = `${this.rid || 'conversation'}.md`; - headers['Content-Type'] = 'text/markdown'; - body = attachment; - } this.state.waitUntil(fetch(this.env.NTFY_URL, { method: 'POST', - body, + body: msg, headers, }).catch(e => console.error('ntfy failed:', e))); }