From 8aa607ae62c0791fbd89c91581bbb47b6fcac988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=8D=E9=81=A5=E4=B9=90?= <49856280+xylplm@users.noreply.github.com> Date: Sun, 18 Feb 2024 15:52:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20ymal=E9=85=8D=E7=BD=AEWEBHOOK=5FBODY?= =?UTF-8?q?=E6=97=B6=E6=8D=A2=E8=A1=8C=E7=AC=A6=E8=A2=AB=E8=BD=AC=E4=B9=89?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E7=A1=AE=E5=88=86=E9=9A=94=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/notify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sample/notify.js b/sample/notify.js index 74776b0f..e96e54c1 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -1284,7 +1284,8 @@ function webhookNotify(text, desp) { return; } const headers = parseHeaders(WEBHOOK_HEADERS); - const body = parseBody(formatBody, WEBHOOK_CONTENT_TYPE); + const formatBodyChar = formatBody.replace(/\\n/g, '\n'); + const body = parseBody(formatBodyChar, WEBHOOK_CONTENT_TYPE); const bodyParam = formatBodyFun(WEBHOOK_CONTENT_TYPE, body); const options = { method: WEBHOOK_METHOD,