mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 23:17:02 +03:00
Bugfix: decrypt failed when OpenPGP.js not loaded
This commit is contained in:
parent
44c42ade52
commit
8c356d8154
2 changed files with 28 additions and 24 deletions
|
|
@ -56,9 +56,7 @@ export const
|
|||
addEventListener('mailvelope', () => this.loadKeyrings(identifier));
|
||||
}
|
||||
|
||||
if (OpenPGPUserStore.isSupported()) {
|
||||
OpenPGPUserStore.loadKeyrings();
|
||||
}
|
||||
OpenPGPUserStore.loadKeyrings();
|
||||
|
||||
if (SettingsCapa('GnuPG')) {
|
||||
GnuPGUserStore.loadKeyrings();
|
||||
|
|
@ -139,9 +137,11 @@ export const
|
|||
}
|
||||
|
||||
// Try OpenPGP.js
|
||||
let result = await OpenPGPUserStore.decrypt(armoredText, sender);
|
||||
if (result) {
|
||||
return result;
|
||||
if (OpenPGPUserStore.isSupported()) {
|
||||
let result = await OpenPGPUserStore.decrypt(armoredText, sender);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
// Try Mailvelope (does not support inline images)
|
||||
|
|
@ -161,7 +161,7 @@ export const
|
|||
*/
|
||||
const body = message.body;
|
||||
body.textContent = '';
|
||||
result = await mailvelope.createDisplayContainer(
|
||||
let result = await mailvelope.createDisplayContainer(
|
||||
'#'+body.id,
|
||||
armoredText,
|
||||
this.mailvelopeKeyring,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue