Improved error handling on PGP and S/MIME decrypt

This commit is contained in:
the-djmaze 2024-03-03 04:14:49 +01:00
parent 0e202a6640
commit 41969bf2c1
10 changed files with 68 additions and 77 deletions

View file

@ -229,7 +229,7 @@ export const OpenPGPUserStore = new class {
* https://docs.openpgpjs.org/#sign-and-verify-cleartext-messages
*/
async verify(message) {
const data = message.pgpSigned(), // { bodyPartId: "1", sigPartId: "2", micAlg: "pgp-sha256" }
const data = message.pgpSigned(), // { partId: "1", sigPartId: "2", micAlg: "pgp-sha256" }
publicKey = this.publicKeys().find(key => key.emails.includes(message.from[0].email));
if (data && publicKey) {
data.folder = message.folder;