From 035f0eb9e3cd63e84110533ecd2a22a09612db86 Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 16 Jun 2024 00:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=9A=E7=9F=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=80=E8=A8=80=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/notify.js | 3 +-- sample/notify.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sample/notify.js b/sample/notify.js index 0379fba6..9a2ca41a 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -97,7 +97,6 @@ const push_config = { WEBHOOK_CONTENT_TYPE: '', // 自定义通知 content-type }; -// 首先读取 面板变量 或者 github action 运行变量 for (const key in push_config) { const v = process.env[key]; if (v) { @@ -1290,7 +1289,7 @@ async function sendNotify(text, desp, params = {}) { } } - if (push_config.HITOKOTO) { + if (push_config.HITOKOTO !== 'false') { desp += '\n\n' + (await one()); } diff --git a/sample/notify.py b/sample/notify.py index fe3bb53e..4c87cd9b 100644 --- a/sample/notify.py +++ b/sample/notify.py @@ -120,7 +120,6 @@ push_config = { } # fmt: on -# 首先读取 面板变量 或者 github action 运行变量 for k in push_config: if os.getenv(k): v = os.getenv(k) @@ -962,7 +961,7 @@ def send(title: str, content: str, ignore_default_config: bool = False, **kwargs return hitokoto = push_config.get("HITOKOTO") - content += "\n\n" + one() if hitokoto else "" + content += "\n\n" + one() if hitokoto != "false" else "" notify_function = add_notify_function() ts = [