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