mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
修复未开启一言时多余空行, 通知渠道改发送前检查 (#2222)
This commit is contained in:
parent
7f3e60423b
commit
35c6475534
|
@ -841,6 +841,7 @@ def one() -> str:
|
|||
return res["hitokoto"] + " ----" + res["from"]
|
||||
|
||||
|
||||
def add_notify_function():
|
||||
if push_config.get("BARK_PUSH"):
|
||||
notify_function.append(bark)
|
||||
if push_config.get("CONSOLE"):
|
||||
|
@ -910,10 +911,9 @@ def send(title: str, content: str) -> None:
|
|||
return
|
||||
|
||||
hitokoto = push_config.get("HITOKOTO")
|
||||
content += "\n\n" + one() if hitokoto else ""
|
||||
|
||||
text = one() if hitokoto else ""
|
||||
content += "\n\n" + text
|
||||
|
||||
add_notify_function()
|
||||
ts = [
|
||||
threading.Thread(target=mode, args=(title, content), name=mode.__name__)
|
||||
for mode in notify_function
|
||||
|
|
Loading…
Reference in New Issue
Block a user