♻️ 调整一言启用逻辑,默认关闭
Some checks are pending
Docker Publish / build-and-push (push) Waiting to run

This commit is contained in:
Cp0204 2024-11-29 00:17:03 +08:00
parent 138bfde587
commit 7229388cdd

View File

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