From 7e2f0b0284a0a7157c6a6d7d8b0e6d805fe0c8d3 Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Thu, 5 Dec 2013 19:03:48 +0100 Subject: [PATCH] fix date bug --- src/js/dao/email-dao.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/js/dao/email-dao.js b/src/js/dao/email-dao.js index cd2806a..6922d0e 100644 --- a/src/js/dao/email-dao.js +++ b/src/js/dao/email-dao.js @@ -434,13 +434,17 @@ define(function(require) { return; } - message.answered = header.answered; - message.unread = header.unread; + // create a bastard child of smtp and imap. + // before thinking this is stupid, talk to the guys who wrote this. + header.id = message.id; + header.body = message.body; + header.html = message.html; + header.attachments = message.attachments; // add the encrypted message to the local storage self._localStoreMessages({ folder: folder.path, - emails: [message] + emails: [header] }, function(err) { if (err) { self._account.busy = false; @@ -449,7 +453,7 @@ define(function(require) { } // decrypt and add to folder in memory - handleMessage(message, function(err, cleartextMessage) { + handleMessage(header, function(err, cleartextMessage) { if (err) { self._account.busy = false; callback(err);