mirror of
https://github.com/moparisthebest/mail
synced 2024-08-13 16:43:47 -04:00
fix multiple events fired on multiple body parts
This commit is contained in:
parent
13a9ac84db
commit
a8d49a632c
@ -165,6 +165,13 @@ define(function(require) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encrypt an email symmetrically
|
||||||
|
*/
|
||||||
|
// EmailDAO.prototype.encryptForNewUser = function(email, callback) {
|
||||||
|
|
||||||
|
// };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encrypt an email asymmetrically for an exisiting user with their public key
|
* Encrypt an email asymmetrically for an exisiting user with their public key
|
||||||
*/
|
*/
|
||||||
@ -288,6 +295,11 @@ define(function(require) {
|
|||||||
// remember how many items should be fetched before the callback fires
|
// remember how many items should be fetched before the callback fires
|
||||||
expectedItems = (message.attachments instanceof Array) ? message.attachments.length + 1 : 1;
|
expectedItems = (message.attachments instanceof Array) ? message.attachments.length + 1 : 1;
|
||||||
|
|
||||||
|
// TODO: remove once attachments work again
|
||||||
|
if (itemCounter > 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// decrypt Message body
|
// decrypt Message body
|
||||||
if (message.body.indexOf(PREFIX) !== -1 && message.body.indexOf(SUFFIX) !== -1) {
|
if (message.body.indexOf(PREFIX) !== -1 && message.body.indexOf(SUFFIX) !== -1) {
|
||||||
decryptMessageBody(message, function(err, ptMessage) {
|
decryptMessageBody(message, function(err, ptMessage) {
|
||||||
|
Loading…
Reference in New Issue
Block a user