aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-03 18:25:37 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-03 18:25:37 +0100
commit7de1c66d86dbfe8e8ef4ed1183e5a9b6a3a636bf (patch)
tree2dafbd0da4308211e35bc0e08d07d4d64d47ca48
parent74686ebb778b740ccfccfbf61ccd24628f60e9d0 (diff)
downloadaerogramme-7de1c66d86dbfe8e8ef4ed1183e5a9b6a3a636bf.tar.gz
aerogramme-7de1c66d86dbfe8e8ef4ed1183e5a9b6a3a636bf.zip
Thunderbird is now able to correctly list msg info
-rw-r--r--src/imap/mailbox_view.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs
index 206b905..861d27c 100644
--- a/src/imap/mailbox_view.rs
+++ b/src/imap/mailbox_view.rs
@@ -1273,7 +1273,11 @@ fn get_message_section<'a>(
part.as_ref().map(|p| p.0.as_ref()).unwrap_or(&[]),
|part_msg| {
let mut ret = vec![];
- for f in &part_msg.mime().kv {
+ let mime = match &part_msg {
+ AnyPart::Msg(msg) => msg.child.mime(),
+ other => other.mime(),
+ };
+ for f in mime.kv.iter() {
let (k, v) = match f {
header::Field::Good(header::Kv2(k, v)) => (k, v),
_ => continue,
@@ -1303,7 +1307,7 @@ fn get_message_section<'a>(
let bytes = match &part {
AnyPart::Txt(p) => p.mime.fields.raw,
AnyPart::Bin(p) => p.mime.fields.raw,
- AnyPart::Msg(p) => p.mime.fields.raw,
+ AnyPart::Msg(p) => p.child.mime().raw,
AnyPart::Mult(p) => p.mime.fields.raw,
};
Ok(bytes.to_vec().into())