From b1482817f1476188cd37e7f3f5d9352dec1f3947 Mon Sep 17 00:00:00 2001 From: jeffjing Date: Tue, 10 Dec 2019 13:26:03 +0800 Subject: [PATCH] feat: add support for Nunjuncks with btntext --- plugin.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugin.js b/plugin.js index 6f8169d..1990178 100644 --- a/plugin.js +++ b/plugin.js @@ -55,10 +55,13 @@ function sendMsgFromWork({ safe, title }) { - title = render(title); - totag = render(totag); - const description = render(message); + title = title && render(title); + totag = totag && render(totag); + btntext = btntext && render(btntext); + const description = message && render(message); + const textcard = { title, url, btntext, description }; + return request({ method: 'POST', url: 'https://qyapi.weixin.qq.com/cgi-bin/message/send',