diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-03-26 13:21:00 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-03-26 13:21:00 -0300 |
commit | 9af1cadaf6ba35c934b7e9d49291b2ecb3ece706 (patch) | |
tree | e7d19d944c06b78eadaf1412aa787b3435fdee1c /src/leap/mail/imap/fetch.py | |
parent | 95709184a3a1f9b99e491579d0dcd21cd3a13c08 (diff) | |
parent | eef78aae4164a740f5673c38202f0a32b3615c1e (diff) |
Merge remote-tracking branch 'refs/remotes/kali/bug/bad-object-in-save-callback' into develop
Diffstat (limited to 'src/leap/mail/imap/fetch.py')
-rw-r--r-- | src/leap/mail/imap/fetch.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/leap/mail/imap/fetch.py b/src/leap/mail/imap/fetch.py index 5f951c3..0a97752 100644 --- a/src/leap/mail/imap/fetch.py +++ b/src/leap/mail/imap/fetch.py @@ -402,8 +402,11 @@ class LeapIncomingMail(object): def _delete_incoming_message(self, doc): """ Delete document. + + :param doc: the SoledadDocument to delete + :type doc: SoledadDocument """ - log.msg("Deleting SoledadDoc %s" % (doc.doc_id)) + log.msg("Deleting Incoming message: %s" % (doc.doc_id,)) self._soledad.delete_doc(doc) def _maybe_decrypt_msg(self, data): @@ -605,12 +608,11 @@ class LeapIncomingMail(object): def msgSavedCallback(result): if not empty(result): leap_events.signal(IMAP_MSG_SAVED_LOCALLY) - deferLater(reactor, 0, self._delete_incoming_message, result) + deferLater(reactor, 0, self._delete_incoming_message, doc) leap_events.signal(IMAP_MSG_DELETED_INCOMING) - deferLater(reactor, 1, self._signal_unread_to_ui) - # XXX should pass a notify_on_disk=True along... - d = self._inbox.addMessage(data, flags=(self.RECENT_FLAG,)) + d = self._inbox.addMessage(data, flags=(self.RECENT_FLAG,), + notify_on_disk=True) d.addCallbacks(msgSavedCallback, self._errback) # |