Do not reset user status after receiving a read receipt

Read receipts never contain the signature, so previously receiving it
cleared the status.
This commit is contained in:
link2xt
2021-03-21 17:42:56 +03:00
committed by link2xt
parent 36aef6499d
commit cdc1063d83
2 changed files with 31 additions and 11 deletions

View File

@@ -237,14 +237,18 @@ pub(crate) async fn dc_receive_imf_inner(
}
// Always update the status, even if there is no footer, to allow removing the status.
if let Err(err) = contact::set_status(
context,
from_id,
mime_parser.footer.clone().unwrap_or_default(),
)
.await
{
warn!(context, "cannot update contact status: {}", err);
//
// Ignore MDNs though, as they never contain the signature even if user has set it.
if mime_parser.mdn_reports.is_empty() {
if let Err(err) = contact::set_status(
context,
from_id,
mime_parser.footer.clone().unwrap_or_default(),
)
.await
{
warn!(context, "cannot update contact status: {}", err);
}
}
// Get user-configured server deletion