mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-02 08:15:55 +00:00
Some senders ship the images their HTML body embeds via cid: as application/octet-stream with no Content-Disposition and no filename. The body rendered them fine, but the "hide inline images" check only recognised parts declared inline with an image/* type, so they also showed up as nameless "Attachment" chips next to the real files. Both viewers now scan the HTML they actually render for cid: references (the same pattern the renderer rewrites to blob URLs) and hide a referenced part when it is an image or generically typed. An explicit attachment disposition always keeps its chip, as does a referenced part with a real non-image type, since that chip is its only download. Plain text rendering references nothing, so nothing is hidden there. The shared rule lives in lib/attachment-visibility.ts so the desktop viewer, the thread view and the decrypted-message path cannot drift apart.