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>
This commit is contained in:
Copilot 2026-05-31 14:26:57 +08:00 committed by GitHub
parent e06c3571a8
commit 0e5b8bef4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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());
}

View File

@ -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 = [