From 8e9c04644ceb469868cde41da1e6c90d01e1d7db Mon Sep 17 00:00:00 2001 From: iequidoo Date: Sun, 6 Apr 2025 02:49:07 -0300 Subject: [PATCH] feat: Always allow non-DC reactions to create chats This also unifies conditions for creating chats for chatmail and non-chatmail with `ShowEmails::All`. As for DC reaction messages, they don't contain extra parts, so they mustn't create chats. --- src/receive_imf.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 5c4a89f00c..e44fa3cd31 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -781,7 +781,9 @@ async fn add_parts( ShowEmails::All => allow_creation = !is_mdn, } } else { - allow_creation = !is_mdn && !is_reaction; + // DC reaction messages don't contain extra parts, so they mustn't create chats. + let is_dc_reaction = is_dc_message == MessengerMessage::Yes && is_reaction; + allow_creation = !is_mdn && !is_dc_reaction; } // check if the message introduces a new chat: