1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-26 10:52:17 -05:00

fix multiple events fired on multiple body parts

This commit is contained in:
Tankred Hase 2013-08-29 16:01:40 +02:00
parent 13a9ac84db
commit a8d49a632c

View File

@ -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
*/
@ -288,6 +295,11 @@ define(function(require) {
// remember how many items should be fetched before the callback fires
expectedItems = (message.attachments instanceof Array) ? message.attachments.length + 1 : 1;
// TODO: remove once attachments work again
if (itemCounter > 1) {
return;
}
// decrypt Message body
if (message.body.indexOf(PREFIX) !== -1 && message.body.indexOf(SUFFIX) !== -1) {
decryptMessageBody(message, function(err, ptMessage) {