PushMe消息通道增加params参数,以支持markdown消息

This commit is contained in:
yafu 2023-08-01 10:02:56 +08:00
parent faf7874763
commit 378a73715b

View File

@ -344,7 +344,7 @@ async function sendNotify(
aibotkNotify(text, desp), //智能微秘书
fsBotNotify(text, desp), //飞书机器人
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) => {
if (PUSHME_KEY) {
const options = {
url: `https://push.i-i.me?push_key=${PUSHME_KEY}`,
json: { title: text, content: desp },
json: { title: text, content: desp, ...params },
headers: {
'Content-Type': 'application/json',
},