Android security implementation Phase 3.1
This commit is contained in:
+9
-3
@@ -9974,11 +9974,11 @@ ${parts.join("")}`;
|
||||
storePromise = null;
|
||||
throw error;
|
||||
});
|
||||
return storePromise;
|
||||
return storePromise.then((value) => JSON.parse(JSON.stringify(value)));
|
||||
}
|
||||
async function persist(value) {
|
||||
await EpMail2.pgpSaveStore({ store: value });
|
||||
storePromise = value;
|
||||
storePromise = Promise.resolve(JSON.parse(JSON.stringify(value)));
|
||||
}
|
||||
function cache(fingerprint, passphrase) {
|
||||
if (!cacheMinutes) {
|
||||
@@ -10488,7 +10488,13 @@ Only continue if you checked this fingerprint with the owner.`)) throw new Error
|
||||
saveAttachment: (details) => EpMail.saveAttachment(details),
|
||||
openExternal: (url) => EpMail.openExternal({ url }),
|
||||
send: async (message) => {
|
||||
if (!message?.pgp || !message.pgp.encrypt && !message.pgp.sign) return EpMail.send(message);
|
||||
if (!message?.pgp || !message.pgp.encrypt && !message.pgp.sign) {
|
||||
if (message?.pgp?.plaintextFallback) {
|
||||
const { pgp: _options, ...plainMessage } = message;
|
||||
return EpMail.send({ ...plainMessage, pgpRequested: true });
|
||||
}
|
||||
return EpMail.send(message);
|
||||
}
|
||||
try {
|
||||
const { rawBase64, to: to2, from } = await daybreakMail.pgp.buildOutgoing(message);
|
||||
const { pgp: _options, text: _text, attachments: _attachments, ...headers } = message;
|
||||
|
||||
Reference in New Issue
Block a user