mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Encrypt/decrypt with multiple addresses in a single GPG key
This commit is contained in:
parent
d14375d022
commit
a34da5de0d
8 changed files with 141 additions and 62 deletions
|
|
@ -59,7 +59,7 @@
|
|||
PgpUserStore.prototype.findPublicKeysByEmail = function (sEmail)
|
||||
{
|
||||
return _.compact(_.flatten(_.map(this.openpgpkeysPublic(), function (oItem) {
|
||||
var oKey = oItem && sEmail === oItem.email ? oItem : null;
|
||||
var oKey = oItem && -1 !== oItem.emails.indexOf(sEmail) ? oItem : null;
|
||||
return oKey ? oKey.getNativeKeys() : [null];
|
||||
}), true));
|
||||
};
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
PgpUserStore.prototype.findPublicKeyByEmailNotNative = function (sEmail)
|
||||
{
|
||||
return _.find(this.openpgpkeysPublic(), function (oItem) {
|
||||
return oItem && sEmail === oItem.email;
|
||||
return oItem && -1 !== oItem.emails.indexOf(sEmail);
|
||||
}) || null;
|
||||
};
|
||||
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
PgpUserStore.prototype.findPrivateKeyByEmailNotNative = function (sEmail)
|
||||
{
|
||||
return _.find(this.openpgpkeysPrivate(), function (oItem) {
|
||||
return oItem && sEmail === oItem.email;
|
||||
return oItem && -1 !== oItem.emails.indexOf(sEmail);
|
||||
}) || null;
|
||||
};
|
||||
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
oPrivateKeys = [],
|
||||
oPrivateKey = null,
|
||||
oKey = _.find(this.openpgpkeysPrivate(), function (oItem) {
|
||||
return oItem && sEmail === oItem.email;
|
||||
return oItem && -1 !== oItem.emails.indexOf(sEmail);
|
||||
})
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue