fix: encrypt broadcast lists

it was all the time questionable if not encrypting broadcast lists
rules the issue that recipients may know each other cryptographically.

however, meanwhile with chatmail, unncrypted broadcasts are no longer possible,
and we actively broke workflows eg. from this teacher:
https://support.delta.chat/t/broadcast-funktioniert-nach-update-nicht-meht/3694

this basically reverts commit
https://github.com/chatmail/core/pull/2707/commits/7e5907daf2cec64769440a8a57aeb5fc479e4dd4
which was that time added last-minute and without lots discussions :)

let the students get their homework again :)
This commit is contained in:
B. Petersen
2025-04-07 20:07:05 +02:00
committed by bjoern
parent 5e95a70eca
commit 3b35d5e0ea
2 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -2552,7 +2552,7 @@ async fn test_broadcast() -> Result<()> {
let msg = bob.recv_msg(&sent_msg).await;
assert_eq!(msg.get_text(), "ola!");
assert_eq!(msg.subject, "Broadcast list");
assert!(!msg.get_showpadlock()); // avoid leaking recipients in encryption data
assert!(msg.get_showpadlock());
let chat = Chat::load_from_db(&bob, msg.chat_id).await?;
assert_eq!(chat.typ, Chattype::Mailinglist);
assert_ne!(chat.id, chat_bob.id);
+4 -6
View File
@@ -415,12 +415,10 @@ impl MimeFactory {
fn should_force_plaintext(&self) -> bool {
match &self.loaded {
Loaded::Message { chat, msg } => {
msg.param
.get_bool(Param::ForcePlaintext)
.unwrap_or_default()
|| chat.typ == Chattype::Broadcast
}
Loaded::Message { msg, .. } => msg
.param
.get_bool(Param::ForcePlaintext)
.unwrap_or_default(),
Loaded::Mdn { .. } => false,
}
}