Telegram: improve webhook config guidance and startup fallback

This commit is contained in:
Harold Hunt
2026-02-25 22:06:08 -05:00
committed by Ayaan Zaidi
parent 5416cabdf8
commit 840b768d97
3 changed files with 42 additions and 6 deletions

View File

@@ -165,11 +165,37 @@ export const TelegramAccountSchemaBase = z
.strict()
.optional(),
proxy: z.string().optional(),
webhookUrl: z.string().optional(),
webhookSecret: z.string().optional().register(sensitive),
webhookPath: z.string().optional(),
webhookHost: z.string().optional(),
webhookPort: z.number().int().positive().optional(),
webhookUrl: z
.string()
.optional()
.describe(
"Public HTTPS webhook URL registered with Telegram for inbound updates. This must be internet-reachable and requires channels.telegram.webhookSecret.",
),
webhookSecret: z
.string()
.optional()
.describe(
"Secret token sent to Telegram during webhook registration and verified on inbound webhook requests. Telegram returns this value for verification; this is not the gateway auth token and not the bot token.",
)
.register(sensitive),
webhookPath: z
.string()
.optional()
.describe(
"Local webhook route path served by the gateway listener. Defaults to /telegram-webhook.",
),
webhookHost: z
.string()
.optional()
.describe(
"Local bind host for the webhook listener. Defaults to 127.0.0.1; keep loopback unless you intentionally expose direct ingress.",
),
webhookPort: z
.number()
.int()
.positive()
.optional()
.describe("Local bind port for the webhook listener. Defaults to 8787."),
actions: z
.object({
reactions: z.boolean().optional(),