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