mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-20 07:01:12 +00:00
remove error when empty subject (#232)
* msg: remove error when empty subject * doc: update changelog
This commit is contained in:
parent
d9272917f5
commit
f0b2fd788d
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Error on empty subject [#229]
|
||||||
|
|
||||||
## [0.5.0] - 2021-10-10
|
## [0.5.0] - 2021-10-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -333,3 +337,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
[#199]: https://github.com/soywod/himalaya/issues/199
|
[#199]: https://github.com/soywod/himalaya/issues/199
|
||||||
[#205]: https://github.com/soywod/himalaya/issues/205
|
[#205]: https://github.com/soywod/himalaya/issues/205
|
||||||
[#215]: https://github.com/soywod/himalaya/issues/215
|
[#215]: https://github.com/soywod/himalaya/issues/215
|
||||||
|
[#229]: https://github.com/soywod/himalaya/issues/229
|
||||||
|
|
|
@ -51,13 +51,13 @@ impl<'a> TryFrom<&'a RawEnvelope> for Envelope<'a> {
|
||||||
let subject: Cow<str> = envelope
|
let subject: Cow<str> = envelope
|
||||||
.subject
|
.subject
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.ok_or(anyhow!("cannot get subject of message {}", fetch.message))
|
.map(|subj| {
|
||||||
.and_then(|subj| {
|
|
||||||
rfc2047_decoder::decode(subj).context(format!(
|
rfc2047_decoder::decode(subj).context(format!(
|
||||||
"cannot decode subject of message {}",
|
"cannot decode subject of message {}",
|
||||||
fetch.message
|
fetch.message
|
||||||
))
|
))
|
||||||
})?
|
})
|
||||||
|
.unwrap_or(Ok(String::default()))?
|
||||||
.into();
|
.into();
|
||||||
|
|
||||||
// Get the sender
|
// Get the sender
|
||||||
|
|
|
@ -705,13 +705,13 @@ impl<'a> TryFrom<&'a imap::types::Fetch> for Msg {
|
||||||
let subject = envelope
|
let subject = envelope
|
||||||
.subject
|
.subject
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.ok_or(anyhow!("cannot get subject of message {}", fetch.message))
|
.map(|subj| {
|
||||||
.and_then(|subj| {
|
|
||||||
rfc2047_decoder::decode(subj).context(format!(
|
rfc2047_decoder::decode(subj).context(format!(
|
||||||
"cannot decode subject of message {}",
|
"cannot decode subject of message {}",
|
||||||
fetch.message
|
fetch.message
|
||||||
))
|
))
|
||||||
})?;
|
})
|
||||||
|
.unwrap_or(Ok(String::default()))?;
|
||||||
|
|
||||||
// Get the sender(s) address(es)
|
// Get the sender(s) address(es)
|
||||||
let from = match envelope
|
let from = match envelope
|
||||||
|
|
Loading…
Reference in a new issue