fix: allow empty followerIdentifiers to avoid blocking openclaw CLI
An empty followerIdentifiers array caused a fatal validation error during plugin registration, which prevented all openclaw CLI commands from running.
This commit is contained in:
@@ -59,8 +59,8 @@ export function validateYonexusServerConfig(raw: unknown): YonexusServerConfig {
|
|||||||
.filter((value) => value.length > 0)
|
.filter((value) => value.length > 0)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
if (!Array.isArray(rawIdentifiers) || followerIdentifiers.length === 0) {
|
if (!Array.isArray(rawIdentifiers)) {
|
||||||
issues.push("followerIdentifiers must contain at least one non-empty identifier");
|
issues.push("followerIdentifiers must be an array");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new Set(followerIdentifiers).size !== followerIdentifiers.length) {
|
if (new Set(followerIdentifiers).size !== followerIdentifiers.length) {
|
||||||
|
|||||||
@@ -19,6 +19,6 @@
|
|||||||
"listenPort": { "type": "number" },
|
"listenPort": { "type": "number" },
|
||||||
"publicWsUrl": { "type": "string" }
|
"publicWsUrl": { "type": "string" }
|
||||||
},
|
},
|
||||||
"required": ["followerIdentifiers", "notifyBotToken", "adminUserId", "listenPort"]
|
"required": ["notifyBotToken", "adminUserId", "listenPort"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user