mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
Create only one MarkseenMdnOnImap job even if message has multiple reports
All created jobs have the same parameters and move the same message, so it does not make sense to create more than one.
This commit is contained in:
committed by
holger krekel
parent
2bba1be817
commit
a48d0492c8
@@ -776,9 +776,8 @@ impl<'a> MimeMessage<'a> {
|
||||
return;
|
||||
}
|
||||
|
||||
for report in &self.reports {
|
||||
let mut mdn_recognized = false;
|
||||
|
||||
for report in &self.reports {
|
||||
if let Some((chat_id, msg_id)) = message::mdn_from_ext(
|
||||
self.context,
|
||||
from_id,
|
||||
@@ -788,6 +787,7 @@ impl<'a> MimeMessage<'a> {
|
||||
self.context.call_cb(Event::MsgRead { chat_id, msg_id });
|
||||
mdn_recognized = true;
|
||||
}
|
||||
}
|
||||
|
||||
if self.has_chat_version() || mdn_recognized {
|
||||
let mut param = Params::new();
|
||||
@@ -798,7 +798,6 @@ impl<'a> MimeMessage<'a> {
|
||||
}
|
||||
job_add(self.context, Action::MarkseenMdnOnImap, 0, param, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user