mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 18:10:21 +00:00
feat(telegram): support custom apiRoot for alternative API endpoints (#48842)
* feat(telegram): support custom apiRoot for alternative API endpoints Add `apiRoot` config option to allow users to specify custom Telegram Bot API endpoints (e.g., self-hosted Bot API servers). Threads the configured base URL through all Telegram API call sites: bot creation, send, probe, audit, media download, and api-fetch. Extends SSRF policy to dynamically trust custom apiRoot hostname for media downloads. Closes #28535 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(telegram): thread apiRoot through allowFrom lookups * fix(telegram): honor lookup transport and local file paths * refactor(telegram): unify username lookup plumbing * fix(telegram): restore doctor lookup imports * fix: document Telegram apiRoot support (#48842) (thanks @Cypherm) --------- Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Ayaan Zaidi <hi@obviy.us>
This commit is contained in:
@@ -119,10 +119,11 @@ export const telegramSetupWizard: ChannelSetupWizard = {
|
||||
"Telegram token missing; use numeric sender ids (usernames require a bot token).",
|
||||
parseInputs: splitSetupEntries,
|
||||
parseId: parseTelegramAllowFromId,
|
||||
resolveEntries: async ({ credentialValues, entries }) =>
|
||||
resolveEntries: async ({ cfg, accountId, credentialValues, entries }) =>
|
||||
resolveTelegramAllowFromEntries({
|
||||
credentialValue: credentialValues.token,
|
||||
entries,
|
||||
apiRoot: resolveTelegramAccount({ cfg, accountId }).config.apiRoot,
|
||||
}),
|
||||
apply: async ({ cfg, accountId, allowFrom }) =>
|
||||
patchChannelConfigForAccount({
|
||||
|
||||
Reference in New Issue
Block a user