diff --git a/dev/Stores/User/OpenPGP.js b/dev/Stores/User/OpenPGP.js index 6e7281764..5c3b907bc 100644 --- a/dev/Stores/User/OpenPGP.js +++ b/dev/Stores/User/OpenPGP.js @@ -213,7 +213,9 @@ export const OpenPGPUserStore = new class { data.Folder = message.folder; data.Uid = message.uid; data.GnuPG = 0; - let response = await Remote.post('MessagePgpVerify', null, data); + let response = data.SigPartId + ? await Remote.post('MessagePgpVerify', null, data) + : { Result: { text: message.plain(), signature: null } }; if (response) { const signature = response.Result.signature ? await openpgp.readSignature({ armoredSignature: response.Result.signature }) diff --git a/dev/Stores/User/Pgp.js b/dev/Stores/User/Pgp.js index 58e90ca83..ce9e128b8 100644 --- a/dev/Stores/User/Pgp.js +++ b/dev/Stores/User/Pgp.js @@ -179,9 +179,7 @@ export const PgpUserStore = new class { async verify(message) { const plain = message.plain(); if (/-----BEGIN PGP SIGNED MESSAGE-----/.test(plain) && /-----BEGIN PGP SIGNATURE-----/.test(plain)) { - let result = await OpenPGPUserStore.verify(plain); - console.dir(result); - return; + return await OpenPGPUserStore.verify(message); } if (message.pgpSigned()) { const sender = message.from[0].email;