fix(whatsapp): preserve text document attachments#27214
Open
EvolvingSoftwareAgent wants to merge 2 commits into
Open
fix(whatsapp): preserve text document attachments#27214EvolvingSoftwareAgent wants to merge 2 commits into
EvolvingSoftwareAgent wants to merge 2 commits into
Conversation
This comment was marked as spam.
This comment was marked as spam.
00fefb2 to
4128fea
Compare
f3abeaf to
7e7831b
Compare
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
Fixes WhatsApp text-document attachment handling end-to-end so generated or received
.html,.md, and.markdownfiles are delivered and processed as native documents instead of falling through to generic/octet-stream, plain text, or omitted-media paths.What changed
text/html/.html/.htmand markdown document coverage (.md,.markdown) to the shared document MIME/extraction paths.MEDIA:extraction and bare local path detection so paths likeMEDIA:/tmp/article.md,/tmp/article.markdown, and/tmp/report.htmlare recognized and routed as native attachments./send-mediaso outbound markdown documents are sent withmimetype: text/markdown.send_messageWhatsApp media delivery through the local bridge/send-mediaendpoint, including document captions and multiple attachments, instead of silently omittingMEDIA:files.mediaMimeTypes) so Python sees HTML documents astext/htmleven when fallback extension inference would be lossy.text/htmlstill caches as.htmland can be text-injected for the agent.MEDIA:tags, bare local HTML/markdown attachment paths, shared MIME mappings, WhatsApp bridge markdown MIME entries, WhatsApp inbound HTML documents, andsend_messageWhatsApp media routing.Validation
node --check scripts/whatsapp-bridge/bridge.jsgit diff --checkscripts/run_tests.sh tests/gateway/test_media_extraction.py tests/gateway/test_whatsapp_connect.py::TestHtmlDocumentAttachments tests/tools/test_send_message_tool.py::TestSendToPlatformWhatsapp— wrapper only selectedtest_media_extraction.pyfor this nodeid-shaped command; 11 passed, 0 failedscripts/run_tests.sh tests/gateway/test_whatsapp_connect.py tests/tools/test_send_message_tool.py— 151 passed, 0 failedNo gateway or WhatsApp bridge restart was performed in Sebastian's live environment; the code is updated in the PR branch only and will take effect after an explicit later restart/deploy.
Refresh status
f3abeafbb..md/.markdownWhatsApp attachment path, including the activeMEDIA:extractor andsend_messagetool path.node --check scripts/whatsapp-bridge/bridge.jsgit diff --checkscripts/run_tests.sh tests/gateway/test_media_extraction.py tests/gateway/test_whatsapp_connect.py::TestHtmlDocumentAttachments tests/tools/test_send_message_tool.py::TestSendToPlatformWhatsapp— 11 passed, 0 failed for selected filescripts/run_tests.sh tests/gateway/test_whatsapp_connect.py tests/tools/test_send_message_tool.py— 151 passed, 0 failed