mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
fix: only set ContentID for inline attachments
This commit is contained in:
@ -510,7 +510,11 @@ func parseAttachment(h message.Header) (*pmapi.Attachment, error) {
|
||||
}
|
||||
}
|
||||
|
||||
att.ContentID = strings.Trim(h.Get("Content-Id"), " <>")
|
||||
// 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"), " <>")
|
||||
}
|
||||
|
||||
return att, nil
|
||||
}
|
||||
|
||||
@ -21,3 +21,4 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
||||
|
||||
### Changed
|
||||
* 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