fix: never send Autocrypt-Gossip in broadcast lists

Broadcast lists are encrypted since 1.159.0,
but Autocrypt-Gossip was not disabled.
As Autocrypt-Gossip contains the email address
and the key of the recipient, it should
not be sent to broadcast lists.
This commit is contained in:
link2xt
2025-04-08 20:20:53 +00:00
committed by l
parent 8db1a01d9a
commit 175145969c

View File

@@ -436,6 +436,12 @@ impl MimeFactory {
async fn should_do_gossip(&self, context: &Context, multiple_recipients: bool) -> Result<bool> {
match &self.loaded {
Loaded::Message { chat, msg } => {
if chat.typ == Chattype::Broadcast {
// Never send Autocrypt-Gossip in broadcast lists
// as it discloses recipient email addresses.
return Ok(false);
}
let cmd = msg.param.get_cmd();
if cmd == SystemMessage::MemberAddedToGroup
|| cmd == SystemMessage::SecurejoinMessage