diff --git a/sample/notify.js b/sample/notify.js index c0f3db43..50d81c88 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 da8bfdcf..dda55d3e 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 = [ 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 = [