mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 06:27:27 +00:00
fix(signal): add missing accountUuid to Zod config schema
SignalAccountSchemaBase uses .strict() but was missing the accountUuid field that is defined in SignalAccountConfig type (types.signal.ts:10) and used at runtime for loop protection (signal/monitor/event-handler.ts:456). This caused config validation to reject channels.signal.accountUuid entries. Add the field to the schema and a regression test.
This commit is contained in:
@@ -184,4 +184,16 @@ describe("config schema regressions", () => {
|
||||
|
||||
expect(res.ok).toBe(false);
|
||||
});
|
||||
|
||||
it("accepts signal accountUuid for loop protection", () => {
|
||||
const res = validateConfigObject({
|
||||
channels: {
|
||||
signal: {
|
||||
accountUuid: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(res.ok).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -977,6 +977,7 @@ export const SignalAccountSchemaBase = z
|
||||
enabled: z.boolean().optional(),
|
||||
configWrites: z.boolean().optional(),
|
||||
account: z.string().optional(),
|
||||
accountUuid: z.string().optional(),
|
||||
httpUrl: z.string().optional(),
|
||||
httpHost: z.string().optional(),
|
||||
httpPort: z.number().int().positive().optional(),
|
||||
|
||||
Reference in New Issue
Block a user