mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +03:00
Use current timestamp instead of 0 for messages without Date:
Otherwise receiving a message without `Date:` in an empty chat pushes it to the bottom of chatlist.
This commit is contained in:
@@ -90,11 +90,14 @@ pub(crate) async fn dc_receive_imf_inner(
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut sent_timestamp = 0;
|
let mut sent_timestamp = if let Some(value) = mime_parser
|
||||||
if let Some(value) = mime_parser.get(HeaderDef::Date) {
|
.get(HeaderDef::Date)
|
||||||
// is not yet checked against bad times! we do this later if we have the database information.
|
.and_then(|value| mailparse::dateparse(value).ok())
|
||||||
sent_timestamp = mailparse::dateparse(value).unwrap_or_default();
|
{
|
||||||
}
|
value
|
||||||
|
} else {
|
||||||
|
dc_create_smeared_timestamp(context).await
|
||||||
|
};
|
||||||
|
|
||||||
let rfc724_mid = mime_parser.get_rfc724_mid().unwrap_or_else(||
|
let rfc724_mid = mime_parser.get_rfc724_mid().unwrap_or_else(||
|
||||||
// missing Message-IDs may come if the mail was set from this account with another
|
// missing Message-IDs may come if the mail was set from this account with another
|
||||||
|
|||||||
Reference in New Issue
Block a user