fix: Make Message-ID of pre-messages stable across resends (#8007)

This commit is contained in:
iequidoo
2026-03-25 14:58:29 -03:00
committed by iequidoo
parent c99b8a4482
commit af16fc9038
3 changed files with 59 additions and 15 deletions

View File

@@ -852,7 +852,13 @@ impl MimeFactory {
let rfc724_mid = match &self.loaded {
Loaded::Message { msg, .. } => match &self.pre_message_mode {
PreMessageMode::Pre { .. } => create_outgoing_rfc724_mid(),
PreMessageMode::Pre { .. } => {
if msg.pre_rfc724_mid.is_empty() {
create_outgoing_rfc724_mid()
} else {
msg.pre_rfc724_mid.clone()
}
}
_ => msg.rfc724_mid.clone(),
},
Loaded::Mdn { .. } => create_outgoing_rfc724_mid(),