← Back to PRs

#9577: feat: Add apiRoot option for custom Telegram Bot API server endpoint

by vfiee open 2026-02-05 11:27 View on GitHub →
channel: telegram stale
<!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a new `apiRoot` option to Telegram configuration, allowing OpenClaw to target a custom/self-hosted Telegram Bot API endpoint. The value is threaded through the Telegram bot creation (`src/telegram/bot.ts`), outbound send utilities (`src/telegram/send.ts`), and webhook management helpers (`src/telegram/webhook-set.ts`), and is added to both the config types (`src/config/types.telegram.ts`) and the zod config schema (`src/config/zod-schema.providers-core.ts`). <h3>Confidence Score: 4/5</h3> - This PR is largely safe to merge, but should tighten config validation for the new option to avoid runtime failures from invalid values. - Changes are localized and consistently threaded through Telegram client construction paths. Main remaining concern is `apiRoot` being accepted as any string in the schema, which can allow invalid configs that only fail at runtime. - src/config/zod-schema.providers-core.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs