deltachat-core-rust
deltachat-core-rust copied to clipboard
No HTML if multiple text parts are cut
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.
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.