mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
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:
@@ -164,38 +164,30 @@ 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,
|
imf_raw,
|
||||||
imf_raw,
|
incoming,
|
||||||
incoming,
|
incoming_origin,
|
||||||
incoming_origin,
|
server_folder,
|
||||||
server_folder,
|
server_uid,
|
||||||
server_uid,
|
&to_ids,
|
||||||
&to_ids,
|
&rfc724_mid,
|
||||||
&rfc724_mid,
|
&mut sent_timestamp,
|
||||||
&mut sent_timestamp,
|
from_id,
|
||||||
from_id,
|
&mut hidden,
|
||||||
&mut hidden,
|
&mut chat_id,
|
||||||
&mut chat_id,
|
seen,
|
||||||
seen,
|
&mut needs_delete_job,
|
||||||
&mut needs_delete_job,
|
&mut insert_msg_id,
|
||||||
&mut insert_msg_id,
|
&mut created_db_entries,
|
||||||
&mut created_db_entries,
|
&mut create_event_to_send,
|
||||||
&mut create_event_to_send,
|
fetching_existing_messages,
|
||||||
fetching_existing_messages,
|
prevent_rename,
|
||||||
prevent_rename,
|
)
|
||||||
)
|
.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(
|
||||||
|
|||||||
Reference in New Issue
Block a user