From 6485e6b4206f379059359dcc9a655b161d74e55a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 14:59:41 +0000 Subject: [PATCH] Apply prettier formatting to notify.js Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- sample/notify.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/sample/notify.js b/sample/notify.js index 16bb88ee..f935e8ce 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -996,7 +996,10 @@ function fsBotNotify(text, desp) { return new Promise((resolve) => { const { FSKEY, FSSECRET } = push_config; if (FSKEY) { - const body = { msg_type: 'text', content: { text: `${text}\n\n${desp}` } }; + const body = { + msg_type: 'text', + content: { text: `${text}\n\n${desp}` }, + }; // Add signature if secret is provided // Note: Feishu's signature algorithm uses timestamp+"\n"+secret as the HMAC key @@ -1282,7 +1285,15 @@ function ntfyNotify(text, desp) { } return new Promise((resolve) => { - const { NTFY_URL, NTFY_TOPIC, NTFY_PRIORITY, NTFY_TOKEN, NTFY_USERNAME, NTFY_PASSWORD, NTFY_ACTIONS } = push_config; + const { + NTFY_URL, + NTFY_TOPIC, + NTFY_PRIORITY, + NTFY_TOKEN, + NTFY_USERNAME, + NTFY_PASSWORD, + NTFY_ACTIONS, + } = push_config; if (NTFY_TOPIC) { const options = { url: `${NTFY_URL || 'https://ntfy.sh'}/${NTFY_TOPIC}`, @@ -1297,7 +1308,8 @@ function ntfyNotify(text, desp) { if (NTFY_TOKEN) { options.headers['Authorization'] = `Bearer ${NTFY_TOKEN}`; } else if (NTFY_USERNAME && NTFY_PASSWORD) { - options.headers['Authorization'] = `Basic ${Buffer.from(`${NTFY_USERNAME}:${NTFY_PASSWORD}`).toString('base64')}`; + options.headers['Authorization'] = + `Basic ${Buffer.from(`${NTFY_USERNAME}:${NTFY_PASSWORD}`).toString('base64')}`; } if (NTFY_ACTIONS) { options.headers['Actions'] = encodeRFC2047(NTFY_ACTIONS);