mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-02 00:06:23 +00:00
Full-message fetches cap body values at 512 KB and never read `isTruncated`, so a bigger body rendered whatever the server cut off with no notice; for a 586 KB HTML report Stalwart returned a 59 character stub and the viewer showed a heading, one line and "…". Port the webmail's refetch: when the first HTML or text body part comes back truncated, `getFullEmail`, `getFullEmails` and `getThreadEmails` fetch the HTML and text body values of those messages again in one batched `Email/get` with an 8 MB cap, keeping the values of other parts. Truncated text attachments don't trigger it. If the body is still truncated, or the refetch fails, the viewer now says the message is too large to show in full.