mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 14:24:59 +00:00
Telegram: improve webhook config guidance and startup fallback
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user