mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 12:56:30 +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
|
||||
if mime_parser.parts.last().is_some() {
|
||||
add_parts(
|
||||
context,
|
||||
&mut mime_parser,
|
||||
imf_raw,
|
||||
incoming,
|
||||
incoming_origin,
|
||||
server_folder,
|
||||
server_uid,
|
||||
&to_ids,
|
||||
&rfc724_mid,
|
||||
&mut sent_timestamp,
|
||||
from_id,
|
||||
&mut hidden,
|
||||
&mut chat_id,
|
||||
seen,
|
||||
&mut needs_delete_job,
|
||||
&mut insert_msg_id,
|
||||
&mut created_db_entries,
|
||||
&mut create_event_to_send,
|
||||
fetching_existing_messages,
|
||||
prevent_rename,
|
||||
)
|
||||
.await
|
||||
.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()
|
||||
}
|
||||
}
|
||||
add_parts(
|
||||
context,
|
||||
&mut mime_parser,
|
||||
imf_raw,
|
||||
incoming,
|
||||
incoming_origin,
|
||||
server_folder,
|
||||
server_uid,
|
||||
&to_ids,
|
||||
&rfc724_mid,
|
||||
&mut sent_timestamp,
|
||||
from_id,
|
||||
&mut hidden,
|
||||
&mut chat_id,
|
||||
seen,
|
||||
&mut needs_delete_job,
|
||||
&mut insert_msg_id,
|
||||
&mut created_db_entries,
|
||||
&mut create_event_to_send,
|
||||
fetching_existing_messages,
|
||||
prevent_rename,
|
||||
)
|
||||
.await
|
||||
.map_err(|err| err.context("add_parts error"))?;
|
||||
|
||||
if mime_parser.location_kml.is_some() || mime_parser.message_kml.is_some() {
|
||||
save_locations(
|
||||
|
||||
Reference in New Issue
Block a user