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:
ingyukoh
2026-03-05 15:27:45 +09:00
committed by Altay
parent 8618a711ff
commit 8bc55541a8
2 changed files with 13 additions and 0 deletions

View File

@@ -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);
});
});

View File

@@ -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(),