PushMe消息通道增加params参数,以支持markdown消息 (#2044)

This commit is contained in:
雨思 2023-08-01 21:33:19 +08:00 committed by GitHub
parent b4e5db9da9
commit a9da8fffc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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',
},