Renaming, comment

This commit is contained in:
Hocuri
2020-06-12 23:01:19 +02:00
parent 1fe85dfb3c
commit 52dfa9b536
2 changed files with 5 additions and 5 deletions

View File

@@ -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>>,

View File

@@ -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
}
}
}