Skip to content

Commit

Permalink
由于微信升级,无法直接接收markdown消息,故调整为纯文本发送 (#38)
Browse files Browse the repository at this point in the history
* 由于微信端无法直接接收markdown消息,故调整为纯文本发送

* revert pnpm-lock.yaml

* fix: lint error

---------

Co-authored-by: iMaeGoo <[email protected]>
  • Loading branch information
kuole-o and imaegoo authored Jan 6, 2025
1 parent eb507be commit 6deae56
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,13 +454,14 @@ async function noticeIfttt(options: CommonOptions) {
async function noticeWecombot(options: CommonOptions) {
checkParameters(options, ['token', 'content']);
const url = `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${options.token}`;
const content = getTxt(options.content);

const response = await axios.post(
url,
{
msgtype: 'markdown',
markdown: {
content: options.content,
msgtype: 'text',
text: {
content,
},
},
{
Expand Down

0 comments on commit 6deae56

Please sign in to comment.