From 678142b3fbb8284dbfc1e3fa62f220dfe6f49012 Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 14 Nov 2023 05:48:12 +0000 Subject: [PATCH] fix: assign MDNs to the trash chat early Otherwise we will try to create an ad-hoc group and failing because there are only two contacts and then unblock a 1:1 chat just to assign the message to trash in the end. --- src/receive_imf.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 0893d6b68..a06307e5f 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -560,6 +560,11 @@ async fn add_parts( markseen_on_imap_table(context, rfc724_mid).await.ok(); } + if chat_id.is_none() && is_mdn { + chat_id = Some(DC_CHAT_ID_TRASH); + info!(context, "Message is an MDN (TRASH).",); + } + if chat_id.is_none() { // try to assign to a chat based on In-Reply-To/References: