feat(notify.js): QYWX推送变为图文消息 (#416)
Some checks failed
Build and push Docker images / docker (push) Has been cancelled
Mirror and run GitLab CI / build (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, linux) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, macos) (push) Has been cancelled
Package Node.js project into an executable / node${{ matrix.nodev }}-${{ matrix.platform }}-x64 (18, win) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (alpine) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linux) (push) Has been cancelled
Package Node.js project into an executable / node18-${{ matrix.platform }}-arm64 (linuxstatic) (push) Has been cancelled

This commit is contained in:
巴拉巴拉嘿 2024-09-13 20:51:43 +08:00 committed by GitHub
parent 47e318dc3d
commit d3475a5032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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: {