fix: 修复白名单为空数组时所有群聊都不生效的问题 (#69)
This commit is contained in:
parent
341eb41607
commit
23e63fa56f
|
@ -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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue