This commit is contained in:
the-djmaze 2024-02-12 01:26:56 +01:00
parent 7da5692865
commit 355f6158be
3 changed files with 16 additions and 6 deletions

View file

@ -1474,7 +1474,7 @@ export class ComposePopupView extends AbstractViewPopup {
: await this.mailvelope.encrypt(recipients);
/*
Object.entries(PgpUserStore.getPublicKeyOfEmails(recipients) || {}).forEach(([k,v]) =>
params.autocrypt.push({addr:k, keydata:v.replace(/-----(BEGIN|END) PGP PUBLIC KEY BLOCK-----/).trim()})
params.autocrypt.push({addr:k, keydata:v.replace(/-----(BEGIN|END) PGP PUBLIC KEY BLOCK-----/g).trim()})
);
*/
} else if (sign || encrypt) {
@ -1525,7 +1525,7 @@ export class ComposePopupView extends AbstractViewPopup {
}
if (encrypt) {
Object.entries(PgpUserStore.getPublicKeyOfEmails(recipients) || {}).forEach(([k,v]) =>
params.autocrypt.push({addr:k, keydata:v.replace(/-----(BEGIN|END) PGP PUBLIC KEY BLOCK-----/).trim()})
params.autocrypt.push({addr:k, keydata:v.replace(/-----(BEGIN|END) PGP PUBLIC KEY BLOCK-----/g, '').trim()})
);
if ('openpgp' == encrypt) {
// Doesn't encrypt attachments