fix in reply to header skipped from mailto url

This commit is contained in:
Clément DOUIN
2024-04-15 14:29:30 +02:00
parent a9e177b77b
commit 220008d0b4
2 changed files with 18 additions and 5 deletions
+16 -5
View File
@@ -69,11 +69,22 @@ impl MessageMailtoCommand {
let mut body = String::new();
for (key, val) in self.url.query_pairs() {
match key.to_lowercase().as_bytes() {
b"cc" => builder = builder.cc(val.to_string()),
b"bcc" => builder = builder.bcc(val.to_string()),
b"subject" => builder = builder.subject(val),
b"body" => body += &val,
match key {
key if key.eq_ignore_ascii_case("in-reply-to") => {
builder = builder.in_reply_to(val.to_string());
}
key if key.eq_ignore_ascii_case("cc") => {
builder = builder.cc(val.to_string());
}
key if key.eq_ignore_ascii_case("bcc") => {
builder = builder.bcc(val.to_string());
}
key if key.eq_ignore_ascii_case("subject") => {
builder = builder.subject(val.to_string());
}
key if key.eq_ignore_ascii_case("body") => {
body += &val;
}
_ => (),
}
}