From 7229388cddce97c37681295617acf7bf554a715a Mon Sep 17 00:00:00 2001 From: Cp0204 Date: Fri, 29 Nov 2024 00:17:03 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=B8=80=E8=A8=80=E5=90=AF=E7=94=A8=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notify.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notify.py b/notify.py index 43fd33f..921b5a3 100644 --- a/notify.py +++ b/notify.py @@ -33,7 +33,7 @@ def print(text, *args, **kw): # 通知服务 # fmt: off push_config = { - 'HITOKOTO': True, # 启用一言(随机句子) + 'HITOKOTO': False, # 启用一言(随机句子) 'BARK_PUSH': '', # bark IP 或设备码,例:https://api.day.app/DxHcxxxxxRxxxxxxcm/ 'BARK_ARCHIVE': '', # bark 推送是否存档 @@ -1020,8 +1020,9 @@ def send(title: str, content: str, ignore_default_config: bool = False, **kwargs print(f"{title} 在SKIP_PUSH_TITLE环境变量内,跳过推送!") return - hitokoto = push_config.get("HITOKOTO", "false") - content += "\n\n" + one() if hitokoto != "false" else "" + hitokoto = push_config.get("HITOKOTO") + if hitokoto and str(hitokoto).lower() != "false": + content += "\n\n" + one() notify_function = add_notify_function() ts = [