From e89bd52386ede0e886595737cf65c79a99f8d89b Mon Sep 17 00:00:00 2001 From: pharaoh2012 <2225220+pharaoh2012@users.noreply.github.com> Date: Mon, 6 Dec 2021 14:04:26 +0800 Subject: [PATCH] Update notify.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 消息过长进行分段发送。 --- sample/notify.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sample/notify.js b/sample/notify.js index 12b7cfeb..a31ac5d3 100644 --- a/sample/notify.js +++ b/sample/notify.js @@ -203,6 +203,12 @@ async function sendNotify( ) { //提供6种通知 desp += author; //增加作者信息,防止被贩卖等 + if(desp.length>900) { + await sendNotify(text, desp.substr(0,900),params,"\n\n==More=="); + await sendNotify(text, desp.substr(900),params,author); + return; + } + await Promise.all([ serverNotify(text, desp), //微信server酱 pushPlusNotify(text, desp), //pushplus(推送加)