mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +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
|
/// returns Some if an event should be send
|
||||||
pub async fn mdn_from_ext(
|
pub async fn handle_mdn(
|
||||||
context: &Context,
|
context: &Context,
|
||||||
from_id: u32,
|
from_id: u32,
|
||||||
rfc724_mid: &str,
|
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.
|
/// 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.
|
/// 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,
|
context: &Context,
|
||||||
failed: &FailureReport,
|
failed: &FailureReport,
|
||||||
error: Option<impl AsRef<str>>,
|
error: Option<impl AsRef<str>>,
|
||||||
|
|||||||
@@ -900,6 +900,7 @@ impl MimeMessage {
|
|||||||
Ok(None)
|
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<()> {
|
async fn heuristically_parse_ndn(&mut self, context: &Context) -> Option<()> {
|
||||||
if self
|
if self
|
||||||
.get(HeaderDef::Subject)?
|
.get(HeaderDef::Subject)?
|
||||||
@@ -951,8 +952,7 @@ impl MimeMessage {
|
|||||||
std::iter::once(&report.original_message_id).chain(&report.additional_message_ids)
|
std::iter::once(&report.original_message_id).chain(&report.additional_message_ids)
|
||||||
{
|
{
|
||||||
if let Some((chat_id, msg_id)) =
|
if let Some((chat_id, msg_id)) =
|
||||||
message::mdn_from_ext(context, from_id, original_message_id, sent_timestamp)
|
message::handle_mdn(context, from_id, original_message_id, sent_timestamp).await
|
||||||
.await
|
|
||||||
{
|
{
|
||||||
context.emit_event(Event::MsgRead { chat_id, msg_id });
|
context.emit_event(Event::MsgRead { chat_id, msg_id });
|
||||||
}
|
}
|
||||||
@@ -968,7 +968,7 @@ impl MimeMessage {
|
|||||||
}
|
}
|
||||||
.trim()
|
.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