fix(photon): preserve outbound voice attachment identity - #91369
Open
mooserini wants to merge 2 commits into
Open
fix(photon): preserve outbound voice attachment identity#91369mooserini wants to merge 2 commits into
mooserini wants to merge 2 commits into
Conversation
Collaborator
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
audio/mp4metadata and filename.Related: #91129
Root cause
Hermes generated a distinct TTS MP3 and correctly extracted that
MEDIA:path, but Spectrum 8'svoice()path converted the bytes to M4A while preserving the sourcetts_*.mp3upload identity. Photon/iMessage could then resolve the native audio message back onto the conversation's original inbound CAF voice memo.This change creates a fresh
voice-<UUID>.m4aobject before callingvoice(), with matching bytes, filename, and MIME metadata.Verification
node --check plugins/platforms/photon/sidecar/index.mjs plugins/platforms/photon/sidecar/voice-send.mjspytest tests/test_photon_voice_dependencies.py tests/plugins/platforms/photon/test_sidecar_voice_runtime.py tests/plugins/platforms/photon/test_outbound_media.py tests/gateway/test_tts_media_routing.py -q— 19 passedpytest tests/plugins/platforms/photon -q— 134 passednpm ls --depth=0—spectrum-ts@8.0.0,ffmpeg-static@5.3.0