#89 OpenPGP.js verify cleartext

This commit is contained in:
the-djmaze 2022-02-02 17:00:27 +01:00
parent f625abe0b2
commit acfe13bdc2
2 changed files with 4 additions and 4 deletions

View file

@ -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 })