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
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72
2 changed files with 18 additions and 5 deletions

View file

@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed watch IMAP envelopes when folder was empty [#179]. - Fixed watch IMAP envelopes when folder was empty [#179].
- Prevented parsing of undefined config options [#188]. - Prevented parsing of undefined config options [#188].
- Fixed `In-Reply-To` header being skipped from mailto URLs [#194].
## [1.0.0-beta.3] - 2024-02-25 ## [1.0.0-beta.3] - 2024-02-25
@ -814,3 +815,4 @@ Few major concepts changed:
[#173]: https://todo.sr.ht/~soywod/pimalaya/173 [#173]: https://todo.sr.ht/~soywod/pimalaya/173
[#184]: https://todo.sr.ht/~soywod/pimalaya/184 [#184]: https://todo.sr.ht/~soywod/pimalaya/184
[#188]: https://todo.sr.ht/~soywod/pimalaya/188 [#188]: https://todo.sr.ht/~soywod/pimalaya/188
[#194]: https://todo.sr.ht/~soywod/pimalaya/194

View file

@ -69,11 +69,22 @@ impl MessageMailtoCommand {
let mut body = String::new(); let mut body = String::new();
for (key, val) in self.url.query_pairs() { for (key, val) in self.url.query_pairs() {
match key.to_lowercase().as_bytes() { match key {
b"cc" => builder = builder.cc(val.to_string()), key if key.eq_ignore_ascii_case("in-reply-to") => {
b"bcc" => builder = builder.bcc(val.to_string()), builder = builder.in_reply_to(val.to_string());
b"subject" => builder = builder.subject(val), }
b"body" => body += &val, 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;
}
_ => (), _ => (),
} }
} }