mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 13:16:53 +00:00
fix: don't select multipart/alternative if length is 0
This commit is contained in:
@ -250,6 +250,10 @@ func bestChoice(childParts []parser.Parts, preferredContentType string) parser.P
|
||||
}
|
||||
|
||||
func allPartsHaveContentType(parts parser.Parts, contentType string) bool {
|
||||
if len(parts) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, part := range parts {
|
||||
t, _, err := part.Header.ContentType()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user