mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 10:54:36 +03:00
imapserver: return all the extensible fields for bodystructure, notably for content-disposition
The gmail iOS/Android app were showing mime image parts as (garbled) text instead of rendering them as image. By returning all the optional fields in the bodystructure fetch attribute, the gmail app renders the image as expected by the user. So we now add all fields. We didn't before, because we weren't keeping track of Content-MD5, Content-Language and Content-Location header fields, since they aren't that useful. Messages in mailboxes have to be reparsed: ./mox reparse Without reparsing, imap responses will claim the extra fields (content-disposition) are absent for existing messages, instead of not claiming anything at all, which is what we did before. Accounts and all/some mailboxes can get their "uid validity" bumped ("./mox bumpuidvalidity $account [$mailbox]"), which should trigger clients to load all messages from scratch, but gmail doesn't appear to notice, so it would be better to remove & add the account in gmail. For issue #327, also relevant to issue #217.
This commit is contained in:
@ -573,9 +573,9 @@ type Message struct {
|
||||
// want to strip whitespace.
|
||||
Preview *string
|
||||
|
||||
// ParsedBuf message structure. Currently saved as JSON of message.Part because bstore
|
||||
// cannot yet store recursive types. Created when first needed, and saved in the
|
||||
// database.
|
||||
// ParsedBuf message structure. Currently saved as JSON of message.Part because
|
||||
// bstore wasn't able to store recursive types when this was implemented. Created
|
||||
// when first needed, and saved in the database.
|
||||
// todo: once replaced with non-json storage, remove date fixup in ../message/part.go.
|
||||
ParsedBuf []byte
|
||||
}
|
||||
|
Reference in New Issue
Block a user