mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-16 20:57:53 +08:00
remove error when empty subject (#232)
* msg: remove error when empty subject * doc: update changelog
This commit is contained in:
@@ -51,13 +51,13 @@ impl<'a> TryFrom<&'a RawEnvelope> for Envelope<'a> {
|
||||
let subject: Cow<str> = envelope
|
||||
.subject
|
||||
.as_ref()
|
||||
.ok_or(anyhow!("cannot get subject of message {}", fetch.message))
|
||||
.and_then(|subj| {
|
||||
.map(|subj| {
|
||||
rfc2047_decoder::decode(subj).context(format!(
|
||||
"cannot decode subject of message {}",
|
||||
fetch.message
|
||||
))
|
||||
})?
|
||||
})
|
||||
.unwrap_or(Ok(String::default()))?
|
||||
.into();
|
||||
|
||||
// Get the sender
|
||||
|
||||
@@ -705,13 +705,13 @@ impl<'a> TryFrom<&'a imap::types::Fetch> for Msg {
|
||||
let subject = envelope
|
||||
.subject
|
||||
.as_ref()
|
||||
.ok_or(anyhow!("cannot get subject of message {}", fetch.message))
|
||||
.and_then(|subj| {
|
||||
.map(|subj| {
|
||||
rfc2047_decoder::decode(subj).context(format!(
|
||||
"cannot decode subject of message {}",
|
||||
fetch.message
|
||||
))
|
||||
})?;
|
||||
})
|
||||
.unwrap_or(Ok(String::default()))?;
|
||||
|
||||
// Get the sender(s) address(es)
|
||||
let from = match envelope
|
||||
|
||||
Reference in New Issue
Block a user