From fc051ba83a1ec831fa023d570b530b33f0eac375 Mon Sep 17 00:00:00 2001 From: smallfawn <101914820+smallfawn@users.noreply.github.com> Date: Tue, 11 Jul 2023 15:35:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=9A=E7=9F=A5=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91=E5=92=8C=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sendNotify.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/sendNotify.js b/sendNotify.js index 3360799..b8157cc 100644 --- a/sendNotify.js +++ b/sendNotify.js @@ -244,18 +244,24 @@ async function sendNotify( } else { if (type == pushType[0]) { console.log(`通知变量为白名单模式`); - for (let sm of checkSmallfawnPush(process.env[pushType[0]])) { + /*for (let sm of checkSmallfawnPush(process.env[pushType[0]])) { if (text == sm) { console.log(`根据[${type}]变量来选择通知`); await push() return } else { - console.log(`[${type}]未含有该脚本的env名字,不通知`) + //console.log(`[${type}]未含有该脚本的env名字,不通知`) } + }*/ + if (checkSmallfawnPush(process.env[pushType[0]]).includes(text)) { + console.log(`根据[${type}]变量来选择通知`); + await push(); + } else { + console.log(`[${type}]未含有该脚本的env名字,不通知`) } } else if (type == pushType[1]) { console.log(`通知变量为黑名单模式`); - for (let sm of checkSmallfawnPush(process.env[pushType[1]])) { + /*for (let sm of checkSmallfawnPush(process.env[pushType[1]])) { if (text == sm) { console.log(`根据[${type}]变量来选择不通知`); } else { @@ -263,6 +269,12 @@ async function sendNotify( await push() return } + }*/ + if (checkSmallfawnPush(process.env[pushType[1]]).includes(text)) { + console.log(`根据[${type}]变量来选择不通知`); + await push(); + } else { + console.log(`[${type}]未含有该脚本的env名字,通知`) } } }