Skip to content

feat(telegram): configurable Bot API base URLs and max audio size - #181

Open
AuYahyire wants to merge 1 commit into
owainlewis:mainfrom
AuYahyire:feat/telegram-local-bot-api
Open

feat(telegram): configurable Bot API base URLs and max audio size#181
AuYahyire wants to merge 1 commit into
owainlewis:mainfrom
AuYahyire:feat/telegram-local-bot-api

Conversation

@AuYahyire

@AuYahyire AuYahyire commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • Adds optional [telegram] base_url / base_file_url so Push can talk to a self-hosted telegram-bot-api (defaults remain api.telegram.org).
  • Adds telegram.max_audio_bytes (default 20 MiB) so local Bot API installs can accept larger voice downloads.
  • Docs and config.toml.example updated; trailing slashes on base URLs are normalized.

Why

Public Bot API caps file downloads at ~20 MB. Operators running a local Bot API (for example http://127.0.0.1:8081) need configurable endpoints and limits without permanently forking Push.

Test plan

  • cargo fmt --all --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo build --locked
  • cargo test --locked
  • Manual: point base_url / base_file_url at a local Bot API, push doctor, send a DM

Risks

  • Misconfigured base_url / base_file_url will break Telegram polling and media download until corrected; defaults keep public API behavior unchanged.
  • Raising max_audio_bytes increases peak memory/disk use while downloading voice.

Related issue

None

Allow self-hosted telegram-bot-api endpoints and larger voice downloads
while keeping public api.telegram.org defaults unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant