mirror of
https://github.com/mjl-/mox.git
synced 2025-01-14 01:06:27 +03:00
webmail: fix showing attachments that are text/plain and have content-disposition: attachment
they were not added to the list of attachments when sending the message to the webmail frontend. they were shown on the "open message in new tab" page.
This commit is contained in:
parent
4283ceecfc
commit
a6ae87d7ac
1 changed files with 4 additions and 6 deletions
|
@ -207,13 +207,11 @@ func parsedMessage(log *mlog.Log, m store.Message, state *msgState, full, msgite
|
|||
disp, params, err := mime.ParseMediaType(cp)
|
||||
log.Check(err, "parsing content-disposition", mlog.Field("cp", cp))
|
||||
if strings.EqualFold(disp, "attachment") {
|
||||
if full {
|
||||
name := p.ContentTypeParams["name"]
|
||||
if name == "" {
|
||||
name = params["filename"]
|
||||
}
|
||||
pm.attachments = append(pm.attachments, Attachment{path, name, p})
|
||||
name := p.ContentTypeParams["name"]
|
||||
if name == "" {
|
||||
name = params["filename"]
|
||||
}
|
||||
pm.attachments = append(pm.attachments, Attachment{path, name, p})
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue