Skip to content

Commit 7284137

Browse files
committed
refactor: Unify conditions for creating a chat for chatmail and non-chatmail with ShowEmails::All
This allows non-DC reactions to create chats for chatmail as well, but this is a common scenario anyway, so this is mainly to simplify the code.
1 parent e5b79bf commit 7284137

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/receive_imf.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ async fn add_parts(
764764
let show_emails =
765765
ShowEmails::from_i32(context.get_config_int(Config::ShowEmails).await?).unwrap_or_default();
766766

767-
let allow_creation;
767+
let mut allow_creation = !is_mdn && (is_dc_message == MessengerMessage::No || !is_reaction);
768768
if mime_parser.is_system_message != SystemMessage::AutocryptSetupMessage
769769
&& is_dc_message == MessengerMessage::No
770770
&& !context.get_config_bool(Config::IsChatmail).await?
@@ -778,10 +778,8 @@ async fn add_parts(
778778
allow_creation = false;
779779
}
780780
ShowEmails::AcceptedContacts => allow_creation = false,
781-
ShowEmails::All => allow_creation = !is_mdn,
781+
ShowEmails::All => {}
782782
}
783-
} else {
784-
allow_creation = !is_mdn && !is_reaction;
785783
}
786784

787785
// check if the message introduces a new chat:

0 commit comments

Comments
 (0)