Files
openclaw/extensions
Yosi Taguri 5661bcebd1 fix(whatsapp): add HTML/XML/CSS to MIME map + fallback for unknown media types
HTML files sent via the message tool were silently dropped — recipients
got text without any attachment. Two root causes:

1. EXT_BY_MIME was missing text/html, text/xml, text/css, and
   application/xml. Since HTML has no magic bytes, detectMime() returned
   undefined, causing the entire media buffer to be discarded.

2. sendMessageWhatsApp and createWebSendApi both silently drop media
   when mediaType is undefined (the `if (mediaBuffer && mediaType)`
   guard falls through to text-only). Added application/octet-stream
   fallback so unknown file types are sent as documents instead of
   silently dropped.

Added .htm alias in MIME_BY_EXT and test coverage for HTML/XML/CSS
detection.

Fixes #51561
2026-04-02 00:13:42 -03:00
..