mirror of
https://github.com/spartanz51/tutabridge.git
synced 2026-06-24 10:54:32 +02:00
cb6c761aac81ea2347f2c4bd671500e04f935f1e
When the realtime path inline-decrypts a brand-new mail \"and\" its MailDetailsBlob in the same batch, it used to render the RFC 2822 envelope right there and persist it to disk so the prefetch loop has no work left for that mail. That shortcut is correct for mails with zero attachments — but mails carrying attachments would end up cached with a text/html-only body and no MIME parts for the attached files, because the event-bus handler cannot synchronously fetch and decrypt each File blob without making the WebSocket dispatch loop sleep. Skip the inline-render when `mail.attachments` is non-empty so the mail keeps `has_details=0` and the prefetch sweep picks it up, emitting a proper `multipart/mixed` envelope through the same path as historical mails.
Languages
Rust
89.5%
TypeScript
5.9%
CSS
2.5%
Python
1.2%
Shell
0.7%
Other
0.1%