feat(telegram): use send_audio for audio MIME types#170
Merged
jamiepine merged 3 commits intospacedriveapp:mainfrom Feb 23, 2026
Merged
feat(telegram): use send_audio for audio MIME types#170jamiepine merged 3 commits intospacedriveapp:mainfrom
jamiepine merged 3 commits intospacedriveapp:mainfrom
Conversation
24e49f9 to
e5e7357
Compare
Audio files sent via OutboundResponse::File were dispatched as send_document, which Telegram renders as a generic file download with no inline playback. Check the mime_type field: if it starts with 'audio/', use send_audio instead. This gives the user an inline audio player in the chat. Non-audio files continue to use send_document as before.
e5e7357 to
57647a2
Compare
jamiepine
approved these changes
Feb 23, 2026
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.
Audio files sent via
OutboundResponse::Filewere dispatched assend_document, which Telegram renders as a generic file attachment with no inline playback.When
mime_typestarts withaudio/, usesend_audioinstead — this gives the recipient an inline audio player in the chat. All other file types continue throughsend_documentunchanged.Both paths preserve the existing HTML caption / plain caption retry logic.
Depends on #174.