feat(telegram): configurable Bot API base URLs and max audio size - #181
Open
AuYahyire wants to merge 1 commit into
Open
feat(telegram): configurable Bot API base URLs and max audio size#181AuYahyire wants to merge 1 commit into
AuYahyire wants to merge 1 commit into
Conversation
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>
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[telegram] base_url/base_file_urlso Push can talk to a self-hosted telegram-bot-api (defaults remainapi.telegram.org).telegram.max_audio_bytes(default 20 MiB) so local Bot API installs can accept larger voice downloads.config.toml.exampleupdated; 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 --checkcargo clippy --locked --all-targets -- -D warningscargo build --lockedcargo test --lockedbase_url/base_file_urlat a local Bot API,push doctor, send a DMRisks
base_url/base_file_urlwill break Telegram polling and media download until corrected; defaults keep public API behavior unchanged.max_audio_bytesincreases peak memory/disk use while downloading voice.Related issue
None