mirror of
https://github.com/smallfawn/QLScriptPublic.git
synced 2025-12-17 23:35:02 +08:00
优化通知处理逻辑和输出
This commit is contained in:
@@ -244,18 +244,24 @@ async function sendNotify(
|
|||||||
} else {
|
} else {
|
||||||
if (type == pushType[0]) {
|
if (type == pushType[0]) {
|
||||||
console.log(`通知变量为白名单模式`);
|
console.log(`通知变量为白名单模式`);
|
||||||
for (let sm of checkSmallfawnPush(process.env[pushType[0]])) {
|
/*for (let sm of checkSmallfawnPush(process.env[pushType[0]])) {
|
||||||
if (text == sm) {
|
if (text == sm) {
|
||||||
console.log(`根据[${type}]变量来选择通知`);
|
console.log(`根据[${type}]变量来选择通知`);
|
||||||
await push()
|
await push()
|
||||||
return
|
return
|
||||||
} else {
|
} 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]) {
|
} else if (type == pushType[1]) {
|
||||||
console.log(`通知变量为黑名单模式`);
|
console.log(`通知变量为黑名单模式`);
|
||||||
for (let sm of checkSmallfawnPush(process.env[pushType[1]])) {
|
/*for (let sm of checkSmallfawnPush(process.env[pushType[1]])) {
|
||||||
if (text == sm) {
|
if (text == sm) {
|
||||||
console.log(`根据[${type}]变量来选择不通知`);
|
console.log(`根据[${type}]变量来选择不通知`);
|
||||||
} else {
|
} else {
|
||||||
@@ -263,6 +269,12 @@ async function sendNotify(
|
|||||||
await push()
|
await push()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
if (checkSmallfawnPush(process.env[pushType[1]]).includes(text)) {
|
||||||
|
console.log(`根据[${type}]变量来选择不通知`);
|
||||||
|
await push();
|
||||||
|
} else {
|
||||||
|
console.log(`[${type}]未含有该脚本的env名字,通知`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user