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:
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
|
||||
*/
|
||||
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user