mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Renaming, comment
This commit is contained in:
@@ -1287,7 +1287,7 @@ pub async fn set_msg_failed(context: &Context, msg_id: MsgId, error: Option<impl
|
||||
}
|
||||
|
||||
/// returns Some if an event should be send
|
||||
pub async fn mdn_from_ext(
|
||||
pub async fn handle_mdn(
|
||||
context: &Context,
|
||||
from_id: u32,
|
||||
rfc724_mid: &str,
|
||||
@@ -1396,7 +1396,7 @@ pub async fn mdn_from_ext(
|
||||
|
||||
/// Marks a message as failed after an ndn (non-delivery-notification) arrived.
|
||||
/// Where appropriate, also adds an info message telling the user which of the recipients of a group message failed.
|
||||
pub(crate) async fn ndn_from_ext(
|
||||
pub(crate) async fn handle_ndn(
|
||||
context: &Context,
|
||||
failed: &FailureReport,
|
||||
error: Option<impl AsRef<str>>,
|
||||
|
||||
@@ -900,6 +900,7 @@ impl MimeMessage {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
/// Some providers like GMX and Yahoo do not send standard NDNs (Non Delivery notifications)
|
||||
async fn heuristically_parse_ndn(&mut self, context: &Context) -> Option<()> {
|
||||
if self
|
||||
.get(HeaderDef::Subject)?
|
||||
@@ -951,8 +952,7 @@ impl MimeMessage {
|
||||
std::iter::once(&report.original_message_id).chain(&report.additional_message_ids)
|
||||
{
|
||||
if let Some((chat_id, msg_id)) =
|
||||
message::mdn_from_ext(context, from_id, original_message_id, sent_timestamp)
|
||||
.await
|
||||
message::handle_mdn(context, from_id, original_message_id, sent_timestamp).await
|
||||
{
|
||||
context.emit_event(Event::MsgRead { chat_id, msg_id });
|
||||
}
|
||||
@@ -968,7 +968,7 @@ impl MimeMessage {
|
||||
}
|
||||
.trim()
|
||||
});
|
||||
message::ndn_from_ext(context, failure_report, error).await
|
||||
message::handle_ndn(context, failure_report, error).await
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user