fix: 修复白名单为空数组时所有群聊都不生效的问题 (#69)

This commit is contained in:
zolay 2023-04-20 04:55:52 +08:00 committed by GitHub
parent 341eb41607
commit 23e63fa56f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -686,13 +686,12 @@ class PluginsLoader {
if (e.group_id) { if (e.group_id) {
/** 白名单群 */ /** 白名单群 */
if (other.whiteGroup) { if (Array.isArray(other.whiteGroup) && other.whiteGroup.length > 0) {
if (other.whiteGroup.includes(Number(e.group_id))) return true return other.whiteGroup.includes(Number(e.group_id));
return false
} }
/** 黑名单群 */ /** 黑名单群 */
if (other.blackGroup && other.blackGroup.includes(Number(e.group_id))) { if (Array.isArray(other.blackGroup) && other.blackGroup.length > 0) {
return false return !other.blackGroup.includes(Number(e.group_id))
} }
} }