mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 10:41:23 +00:00
refactor: simplify nodes notify inputs
This commit is contained in:
@@ -27,7 +27,7 @@ export function registerNodesNotifyCommand(nodes: Command) {
|
||||
throw new Error("missing --title or --body");
|
||||
}
|
||||
const invokeTimeout = opts.invokeTimeout
|
||||
? Number.parseInt(String(opts.invokeTimeout), 10)
|
||||
? Number.parseInt(opts.invokeTimeout, 10)
|
||||
: undefined;
|
||||
const invokeParams: Record<string, unknown> = {
|
||||
nodeId,
|
||||
@@ -39,7 +39,7 @@ export function registerNodesNotifyCommand(nodes: Command) {
|
||||
priority: opts.priority,
|
||||
delivery: opts.delivery,
|
||||
},
|
||||
idempotencyKey: String(opts.idempotencyKey ?? randomIdempotencyKey()),
|
||||
idempotencyKey: opts.idempotencyKey ?? randomIdempotencyKey(),
|
||||
};
|
||||
if (typeof invokeTimeout === "number" && Number.isFinite(invokeTimeout)) {
|
||||
invokeParams.timeoutMs = invokeTimeout;
|
||||
|
||||
Reference in New Issue
Block a user