dc_receive_imf: remove dead code

mimeparser ensures that mails have at least one part.

Besides that, add_parts() handles the case of no parts just fine.
This commit is contained in:
link2xt
2021-07-31 18:17:16 +03:00
parent c380647c12
commit bf68bc14a4

View File

@@ -164,7 +164,6 @@ pub(crate) async fn dc_receive_imf_inner(
); );
// Add parts // Add parts
if mime_parser.parts.last().is_some() {
add_parts( add_parts(
context, context,
&mut mime_parser, &mut mime_parser,
@@ -189,13 +188,6 @@ pub(crate) async fn dc_receive_imf_inner(
) )
.await .await
.map_err(|err| err.context("add_parts error"))?; .map_err(|err| err.context("add_parts error"))?;
} else {
// there are parts in this message, do some basic calculations so that the variables
// are correct in the further processing
if sent_timestamp > time() {
sent_timestamp = time()
}
}
if mime_parser.location_kml.is_some() || mime_parser.message_kml.is_some() { if mime_parser.location_kml.is_some() || mime_parser.message_kml.is_some() {
save_locations( save_locations(