mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-08 18:45:13 +00:00
add missing subject prefix for replies
This commit is contained in:
parent
7b046f87ee
commit
a70631de1c
|
@ -293,7 +293,8 @@ impl<'m> Msg<'m> {
|
||||||
"in-reply-to" => msg.in_reply_to(value.parse().unwrap()),
|
"in-reply-to" => msg.in_reply_to(value.parse().unwrap()),
|
||||||
"from" => match value.parse::<lettre::message::Mailbox>() {
|
"from" => match value.parse::<lettre::message::Mailbox>() {
|
||||||
Ok(addr) => {
|
Ok(addr) => {
|
||||||
let msg_id = format!("{}@{}", Uuid::new_v4().to_string(), addr.email.domain());
|
let msg_id =
|
||||||
|
format!("{}@{}", Uuid::new_v4().to_string(), addr.email.domain());
|
||||||
msg.from(addr).message_id(Some(msg_id))
|
msg.from(addr).message_id(Some(msg_id))
|
||||||
}
|
}
|
||||||
Err(_) => msg,
|
Err(_) => msg,
|
||||||
|
@ -435,7 +436,9 @@ impl<'m> Msg<'m> {
|
||||||
in_reply_to: headers.get_first_value("message-id"),
|
in_reply_to: headers.get_first_value("message-id"),
|
||||||
to,
|
to,
|
||||||
cc: None,
|
cc: None,
|
||||||
subject: headers.get_first_value("subject"),
|
subject: headers
|
||||||
|
.get_first_value("subject")
|
||||||
|
.map(|s| format!("Re: {}", s)),
|
||||||
default_content: Some(thread),
|
default_content: Some(thread),
|
||||||
};
|
};
|
||||||
Msg::build_tpl(config, account, msg_spec)
|
Msg::build_tpl(config, account, msg_spec)
|
||||||
|
@ -503,7 +506,9 @@ impl<'m> Msg<'m> {
|
||||||
in_reply_to: headers.get_first_value("message-id"),
|
in_reply_to: headers.get_first_value("message-id"),
|
||||||
cc,
|
cc,
|
||||||
to: Some(vec![reply_to, to].concat()),
|
to: Some(vec![reply_to, to].concat()),
|
||||||
subject: headers.get_first_value("subject"),
|
subject: headers
|
||||||
|
.get_first_value("subject")
|
||||||
|
.map(|s| format!("Re: {}", s)),
|
||||||
default_content: Some(thread),
|
default_content: Some(thread),
|
||||||
};
|
};
|
||||||
Msg::build_tpl(config, account, msg_spec)
|
Msg::build_tpl(config, account, msg_spec)
|
||||||
|
|
Loading…
Reference in a new issue