mioku-plugin-chat 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types.ts +1 -0
- package/utils/group-config.ts +9 -0
package/package.json
CHANGED
package/types.ts
CHANGED
package/utils/group-config.ts
CHANGED
|
@@ -18,6 +18,8 @@ const OVERRIDABLE_BOOLEAN_FIELDS = [
|
|
|
18
18
|
"enableMediaRecognition",
|
|
19
19
|
] as const;
|
|
20
20
|
|
|
21
|
+
const OVERRIDABLE_ARRAY_FIELDS = ["allowedExternalSkills"] as const;
|
|
22
|
+
|
|
21
23
|
/**
|
|
22
24
|
* 把每个群的覆盖配置浅合并到全局配置上
|
|
23
25
|
* - 子对象(如 emoji)只覆盖其中存在的字段,未填字段继承全局
|
|
@@ -55,6 +57,13 @@ export function mergeGroupOverrides(
|
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
|
|
60
|
+
for (const key of OVERRIDABLE_ARRAY_FIELDS) {
|
|
61
|
+
const value = overridesMap[key];
|
|
62
|
+
if (Array.isArray(value)) {
|
|
63
|
+
resultMap[key] = value.filter((v) => typeof v === "string");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
58
67
|
return result;
|
|
59
68
|
}
|
|
60
69
|
|