From 23e63fa56f19ecd181d4908406c9f92a818f06f1 Mon Sep 17 00:00:00 2001 From: zolay Date: Thu, 20 Apr 2023 04:55:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BD=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E4=B8=BA=E7=A9=BA=E6=95=B0=E7=BB=84=E6=97=B6=E6=89=80?= =?UTF-8?q?=E6=9C=89=E7=BE=A4=E8=81=8A=E9=83=BD=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#69)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugins/loader.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/plugins/loader.js b/lib/plugins/loader.js index c2924f3..30feade 100644 --- a/lib/plugins/loader.js +++ b/lib/plugins/loader.js @@ -686,13 +686,12 @@ class PluginsLoader { if (e.group_id) { /** 白名单群 */ - if (other.whiteGroup) { - if (other.whiteGroup.includes(Number(e.group_id))) return true - return false + if (Array.isArray(other.whiteGroup) && other.whiteGroup.length > 0) { + return other.whiteGroup.includes(Number(e.group_id)); } /** 黑名单群 */ - if (other.blackGroup && other.blackGroup.includes(Number(e.group_id))) { - return false + if (Array.isArray(other.blackGroup) && other.blackGroup.length > 0) { + return !other.blackGroup.includes(Number(e.group_id)) } }