From 2af7083d4543be9a1b1476de75fafb17bfe78b95 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Wed, 18 Feb 2015 11:33:42 -0600 Subject: Use MessageCollection instead of IMAPMailbox in IncomingMail --- src/leap/mail/incoming/service.py | 8 ++++---- src/leap/mail/incoming/tests/test_incoming_mail.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/leap/mail/incoming') diff --git a/src/leap/mail/incoming/service.py b/src/leap/mail/incoming/service.py index fadfd9f..8b5c371 100644 --- a/src/leap/mail/incoming/service.py +++ b/src/leap/mail/incoming/service.py @@ -97,7 +97,7 @@ class IncomingMail(Service): LEAP_SIGNATURE_HEADER = 'X-Leap-Signature' """ - Header added to messages when they are decrypted by the IMAP fetcher, + Header added to messages when they are decrypted by the fetcher, which states the validity of an eventual signature that might be included in the encrypted blob. """ @@ -118,7 +118,7 @@ class IncomingMail(Service): :type soledad: Soledad :param inbox: the inbox where the new emails will be stored - :type inbox: IMAPMailbox + :type inbox: MessageCollection :param check_period: the period to fetch new mail, in seconds. :type check_period: int @@ -266,7 +266,7 @@ class IncomingMail(Service): Sends unread event to ui. """ leap_events.signal( - IMAP_UNREAD_MAIL, str(self._inbox.getUnseenCount())) + IMAP_UNREAD_MAIL, str(self._inbox.count_unseen())) # process incoming mail. @@ -729,7 +729,7 @@ class IncomingMail(Service): d.addCallback(signal_deleted) return d - d = self._inbox.addMessage(data, (self.RECENT_FLAG,)) + d = self._inbox.add_raw_message(data, (self.RECENT_FLAG,)) d.addCallbacks(msgSavedCallback, self._errback) return d diff --git a/src/leap/mail/incoming/tests/test_incoming_mail.py b/src/leap/mail/incoming/tests/test_incoming_mail.py index a932a95..f43f746 100644 --- a/src/leap/mail/incoming/tests/test_incoming_mail.py +++ b/src/leap/mail/incoming/tests/test_incoming_mail.py @@ -91,7 +91,7 @@ subject: independence of cyberspace self.fetcher = IncomingMail( self._km, self._soledad, - inbox, + inbox.collection, ADDRESS) # The messages don't exist on soledad will fail on deletion -- cgit v1.2.3