feat: temporarily disable OpenPGP recipient anonymization

This commit is contained in:
link2xt
2025-10-31 23:52:00 +00:00
committed by l
parent 9bc2aeebb8
commit 098084b9a7
3 changed files with 45 additions and 6 deletions

View File

@@ -46,6 +46,7 @@ impl EncryptHelper {
keyring: Vec<SignedPublicKey>,
mail_to_encrypt: MimePart<'static>,
compress: bool,
anonymous_recipients: bool,
) -> Result<String> {
let sign_key = load_self_secret_key(context).await?;
@@ -53,7 +54,14 @@ impl EncryptHelper {
let cursor = Cursor::new(&mut raw_message);
mail_to_encrypt.clone().write_part(cursor).ok();
let ctext = pgp::pk_encrypt(raw_message, keyring, Some(sign_key), compress).await?;
let ctext = pgp::pk_encrypt(
raw_message,
keyring,
Some(sign_key),
compress,
anonymous_recipients,
)
.await?;
Ok(ctext)
}