From 0e5b8bef4b5dd1e7e24b898e9e00f3eb25c2b2e8 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 31 May 2026 14:26:57 +0800 Subject: [PATCH] Fix HITOKOTO parameter boolean/string type handling (#2918) * Initial plan * Fix HITOKOTO parameter type mismatch in notify scripts Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> * Refactor JavaScript HITOKOTO check for consistency with Python Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- sample/notify.js | 2 +- sample/notify.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/notify.js b/sample/notify.js index 6b6340a4..da985b2a 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -1582,7 +1582,7 @@ async function sendNotify(text, desp, params = {}) { } } - if (push_config.HITOKOTO !== 'false') { + if (![false, 'false'].includes(push_config.HITOKOTO)) { desp += '\n\n' + (await one()); } diff --git a/sample/notify.py b/sample/notify.py index 74c9bd70..0bc81ffd 100644 --- a/sample/notify.py +++ b/sample/notify.py @@ -1131,7 +1131,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 != "false" else "" + content += "\n\n" + one() if hitokoto not in [False, "false"] else "" notify_function = add_notify_function() ts = [