diff --git a/extensions/telegram/src/config-schema.test.ts b/extensions/telegram/src/config-schema.test.ts index 728719f9b84d..d6aad9d21703 100644 --- a/extensions/telegram/src/config-schema.test.ts +++ b/extensions/telegram/src/config-schema.test.ts @@ -166,6 +166,19 @@ describe("telegram custom commands schema", () => { } }); + it("preserves rich message inheritance for account overrides", () => { + const res = TelegramConfigSchema.safeParse({ + richMessages: true, + accounts: { ops: {} }, + }); + + expect(res.success).toBe(true); + if (res.success) { + expect(res.data.richMessages).toBe(true); + expect(res.data.accounts?.ops?.richMessages).toBeUndefined(); + } + }); + it("normalizes custom commands", () => { const res = TelegramConfigSchema.safeParse({ customCommands: [{ command: "/Backup", description: " Git backup " }], diff --git a/src/config/zod-schema.providers-core.ts b/src/config/zod-schema.providers-core.ts index bcb729b56634..07e1a88227fd 100644 --- a/src/config/zod-schema.providers-core.ts +++ b/src/config/zod-schema.providers-core.ts @@ -281,7 +281,7 @@ export const TelegramAccountSchemaBase = z dms: z.record(z.string(), DmConfigSchema.optional()).optional(), direct: z.record(z.string(), TelegramDirectSchema.optional()).optional(), textChunkLimit: z.number().int().positive().optional(), - richMessages: z.boolean().optional().default(false), + richMessages: z.boolean().optional(), streaming: TelegramPreviewStreamingConfigSchema.optional(), mediaMaxMb: z.number().positive().optional(), timeoutSeconds: z.number().int().positive().optional(),