diff --git a/sample/notify.js b/sample/notify.js index f935e8ce..59d38e86 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -1511,7 +1511,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 8dd885ca..6b82a572 100644 --- a/sample/notify.py +++ b/sample/notify.py @@ -1088,7 +1088,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 = [ diff --git a/sample/notify.py.save b/sample/notify.py.save index 0bfe668a..cda60ef3 100644 --- a/sample/notify.py.save +++ b/sample/notify.py.save @@ -991,7 +991,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 = [