mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-07 20:06:08 +08:00
PushMe消息通道增加params参数,以支持markdown消息 (#2044)
This commit is contained in:
parent
b4e5db9da9
commit
a9da8fffc1
|
@ -344,7 +344,7 @@ async function sendNotify(
|
||||||
aibotkNotify(text, desp), //智能微秘书
|
aibotkNotify(text, desp), //智能微秘书
|
||||||
fsBotNotify(text, desp), //飞书机器人
|
fsBotNotify(text, desp), //飞书机器人
|
||||||
smtpNotify(text, desp), //SMTP 邮件
|
smtpNotify(text, desp), //SMTP 邮件
|
||||||
PushMeNotify(text, desp), //PushMe
|
PushMeNotify(text, desp, params), //PushMe
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1126,12 +1126,12 @@ function smtpNotify(text, desp) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function PushMeNotify(text, desp) {
|
function PushMeNotify(text, desp, params = {}) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
if (PUSHME_KEY) {
|
if (PUSHME_KEY) {
|
||||||
const options = {
|
const options = {
|
||||||
url: `https://push.i-i.me?push_key=${PUSHME_KEY}`,
|
url: `https://push.i-i.me?push_key=${PUSHME_KEY}`,
|
||||||
json: { title: text, content: desp },
|
json: { title: text, content: desp, ...params },
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user