chore: 通知优化

This commit is contained in:
xiaojunnuo
2025-05-29 23:31:39 +08:00
parent a9b302e38d
commit 81282a9c88
3 changed files with 13 additions and 10 deletions
@@ -55,14 +55,14 @@ export class QywxNotification extends BaseNotification {
* }
* }
*/
const color = body.errorMessage?'red':'green';
await this.http.request({
url: this.webhook,
method: 'POST',
data: {
msgtype: 'text',
text: {
content: `${body.title}\n${body.content}\n查看详情: ${body.url}`,
msgtype: 'markdown',
markdown: {
content: `<font color='${color}'>${body.title}</font>\n\n\n${body.content}\n\n[查看详情](${body.url})`,
mentioned_list: this.mentionedList,
mentioned_mobile_list: this.mentionedMobileList,
},