deltachat-core-rust icon indicating copy to clipboard operation
deltachat-core-rust copied to clipboard

No HTML if multiple text parts are cut

Open link2xt opened this issue 1 year ago • 2 comments

I have received an email which consists of a short text/plain part, long inline message/rfc822 (forwarded mail) and a text/plain attachment.

The second part is cut, but "Show Full Message..." is displayed under the first part and displays the same short message I can already see. The second part I can only fully read in the message info.

link2xt avatar Jun 08 '23 00:06 link2xt

The problem starts with a mimeparser, which stores is_mime_modified for the whole message rather than a part: https://github.com/deltachat/deltachat-core-rust/blob/4767f1ce743d2170142c3cc126838d55505eb807/src/mimeparser.rs#L103 Whether to display "Show Full Message..." should be decided per part, not for all parts at once. In extreme case it should be possible to receive an email consisting of 3 multipart/alternative parts, each of which contains a text and HTML subpart in turn. In this case receive_imf should add 3 message bubbles, each with a "Show Full Message..." link. This also means that decoded_data should be per-part, not a single one for the whole message, so each message bubble can have a different "full message": https://github.com/deltachat/deltachat-core-rust/blob/4767f1ce743d2170142c3cc126838d55505eb807/src/receive_imf.rs#L1077 Before, mime_headers column was always storing the whole decrypted message, but now it should be able to store message parts which contain the relevant HTML part.

link2xt avatar Jun 10 '23 00:06 link2xt