fix(telegram): preserve voice notes and recover from missing thread/reply targets - #13662
Closed
tumbleweedlabs wants to merge 3 commits into
Closed
fix(telegram): preserve voice notes and recover from missing thread/reply targets#13662tumbleweedlabs wants to merge 3 commits into
tumbleweedlabs wants to merge 3 commits into
Conversation
Contributor
|
Thanks for the thorough PR! After reviewing current
The branch is also marked as having merge conflicts against Closing as implemented. The underlying issues were real and well-diagnosed — they just got fixed on a parallel track before this PR landed. Appreciate the regression tests; if any specific coverage from This is an automated hermes-sweeper review. |
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
This cleans up Telegram voice-note delivery so auto-TTS replies stay native voice notes and the send path degrades gracefully when Telegram rejects stale thread or reply targets.
What changed
.ogg/ voice-note friendly output instead of defaulting everything through an.mp3temp path.ogg/.opusfiles viasend_voicemessage_thread_idwhen Telegram returnsMessage thread not foundreply_to_message_idwhen the replied-to message is gonesend_audiofor non-OGG files.oggtemp output for Telegram auto voice replies when the active TTS provider can produce it directlyWhy
We had two ugly failure modes in Telegram:
.mp3temp filenameThis patch keeps the voice-note path native and makes delivery more tolerant of stale Telegram metadata.
Testing
pytest -q tests/gateway/test_telegram_auto_tts_path.py \ tests/gateway/test_voice_command.py \ tests/tools/test_tool_backend_helpers.py \ tests/tools/test_tts_speed.py \ tests/gateway/test_telegram_thread_fallback.pyResult:
251 passed