From 220b7c7481d9aac99ade2f6ba460650f4dd217b2 Mon Sep 17 00:00:00 2001 From: ingyukoh Date: Thu, 5 Mar 2026 14:16:57 +0900 Subject: [PATCH] fix(config): add missing editMessage and createForumTopic to Telegram actions schema The TelegramActionConfig type defines editMessage and createForumTopic fields, but the corresponding Zod schema was missing them. Because the schema uses .strict(), users setting these documented config options get a validation error: "Unrecognized key(s) in object". Fixes the schema to match the type definition and adds a regression test. --- src/config/config.schema-regressions.test.ts | 15 +++++++++++++++ src/config/zod-schema.providers-core.ts | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/config/config.schema-regressions.test.ts b/src/config/config.schema-regressions.test.ts index f8fbdc27b64..3e605e06c35 100644 --- a/src/config/config.schema-regressions.test.ts +++ b/src/config/config.schema-regressions.test.ts @@ -196,4 +196,19 @@ describe("config schema regressions", () => { expect(res.ok).toBe(true); }); + + it("accepts telegram actions editMessage and createForumTopic", () => { + const res = validateConfigObject({ + channels: { + telegram: { + actions: { + editMessage: true, + createForumTopic: false, + }, + }, + }, + }); + + expect(res.ok).toBe(true); + }); }); diff --git a/src/config/zod-schema.providers-core.ts b/src/config/zod-schema.providers-core.ts index 833a4a81d64..d68ac63759c 100644 --- a/src/config/zod-schema.providers-core.ts +++ b/src/config/zod-schema.providers-core.ts @@ -244,7 +244,9 @@ export const TelegramAccountSchemaBase = z sendMessage: z.boolean().optional(), poll: z.boolean().optional(), deleteMessage: z.boolean().optional(), + editMessage: z.boolean().optional(), sticker: z.boolean().optional(), + createForumTopic: z.boolean().optional(), }) .strict() .optional(),