feat(notify.js): QYWX推送变为图文消息

This commit is contained in:
superHao 2024-09-13 16:04:13 +08:00
parent 47e318dc3d
commit d40205ad13

View File

@ -619,6 +619,7 @@ function ddBotNotify(text, desp) {
function qywxAmNotify(text, desp) {
return new Promise(resolve => {
desp=desp.replace(/\n/g, '<br>');
if (QYWX_AM) {
const QYWX_AM_AY = QYWX_AM.split(',');
send({
@ -646,9 +647,15 @@ function qywxAmNotify(text, desp) {
touser: `${QYWX_AM_AY[2]}`,
agentid: `${QYWX_AM_AY[3]}`,
safe: '0',
msgtype: 'text',
text: {
content: `${text}\n\n${desp}`,
msgtype: 'mpnews',
mpnews : {
articles:[
{
title: `${text}`,
thumb_media_id: `${QYWX_AM_AY[4]}`,
content: `${desp}`,
}
]
},
},
config: {