mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
修复通知文件一言设置
This commit is contained in:
parent
7d0cae7839
commit
035f0eb9e3
|
@ -97,7 +97,6 @@ const push_config = {
|
||||||
WEBHOOK_CONTENT_TYPE: '', // 自定义通知 content-type
|
WEBHOOK_CONTENT_TYPE: '', // 自定义通知 content-type
|
||||||
};
|
};
|
||||||
|
|
||||||
// 首先读取 面板变量 或者 github action 运行变量
|
|
||||||
for (const key in push_config) {
|
for (const key in push_config) {
|
||||||
const v = process.env[key];
|
const v = process.env[key];
|
||||||
if (v) {
|
if (v) {
|
||||||
|
@ -1290,7 +1289,7 @@ async function sendNotify(text, desp, params = {}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (push_config.HITOKOTO) {
|
if (push_config.HITOKOTO !== 'false') {
|
||||||
desp += '\n\n' + (await one());
|
desp += '\n\n' + (await one());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,6 @@ push_config = {
|
||||||
}
|
}
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
||||||
# 首先读取 面板变量 或者 github action 运行变量
|
|
||||||
for k in push_config:
|
for k in push_config:
|
||||||
if os.getenv(k):
|
if os.getenv(k):
|
||||||
v = os.getenv(k)
|
v = os.getenv(k)
|
||||||
|
@ -962,7 +961,7 @@ def send(title: str, content: str, ignore_default_config: bool = False, **kwargs
|
||||||
return
|
return
|
||||||
|
|
||||||
hitokoto = push_config.get("HITOKOTO")
|
hitokoto = push_config.get("HITOKOTO")
|
||||||
content += "\n\n" + one() if hitokoto else ""
|
content += "\n\n" + one() if hitokoto != "false" else ""
|
||||||
|
|
||||||
notify_function = add_notify_function()
|
notify_function = add_notify_function()
|
||||||
ts = [
|
ts = [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user