forked from Silverfish/proton-bridge
fix: only set ContentID for inline attachments
This commit is contained in:
@ -510,7 +510,11 @@ func parseAttachment(h message.Header) (*pmapi.Attachment, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only set ContentID if it should be inline;
|
||||||
|
// API infers content disposition based on whether ContentID is present.
|
||||||
|
if disp, _, err := h.ContentDisposition(); err == nil && disp == "inline" {
|
||||||
att.ContentID = strings.Trim(h.Get("Content-Id"), " <>")
|
att.ContentID = strings.Trim(h.Get("Content-Id"), " <>")
|
||||||
|
}
|
||||||
|
|
||||||
return att, nil
|
return att, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,3 +21,4 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* GODT-389 Prefer `From` header instead of `MAIL FROM` address.
|
* GODT-389 Prefer `From` header instead of `MAIL FROM` address.
|
||||||
|
* GODT-898 Only set ContentID for inline attachments.
|
||||||
|
|||||||
Reference in New Issue
Block a user