api!: remove data from DC_EVENT_INCOMING_MSG_BUNCH

It is not used by existing clients
and incorrectly included all downloaded messages,
including outgoing messages and MDNs.
This commit is contained in:
link2xt
2024-03-19 11:46:16 +00:00
parent 0f5d5dd2b2
commit 1ebbe26ebb
5 changed files with 13 additions and 26 deletions

View File

@@ -717,12 +717,8 @@ impl Imap {
info!(context, "{} mails read from \"{}\".", read_cnt, folder);
let msg_ids: Vec<MsgId> = received_msgs
.iter()
.flat_map(|m| m.msg_ids.clone())
.collect();
if !msg_ids.is_empty() {
context.emit_event(EventType::IncomingMsgBunch { msg_ids });
if !received_msgs.is_empty() {
context.emit_event(EventType::IncomingMsgBunch);
}
chat::mark_old_messages_as_noticed(context, received_msgs).await?;