mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 16:06:30 +03:00
fix: add padlock to empty part if the whole message is empty
parse_mime_recursive() skips empty text parts, so there may be no parts as the result of parsing. In this case an empty part is added. However, because it is added with parts.push() rather than add_single_part(), it is added without a padlock even if the message is encrypted. `do_add_single_part()` adds padlock (GuaranteeE2EE param) and should be used to add parts instead.
This commit is contained in:
@@ -694,7 +694,7 @@ impl MimeMessage {
|
||||
}
|
||||
}
|
||||
|
||||
self.parts.push(part);
|
||||
self.do_add_single_part(part);
|
||||
}
|
||||
|
||||
if self.headers.contains_key("auto-submitted") {
|
||||
|
||||
Reference in New Issue
Block a user