summaryrefslogtreecommitdiff
path: root/src/leap/mail/incoming
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-02-18 11:33:42 -0600
committerRuben Pollan <meskio@sindominio.net>2015-02-18 17:30:29 -0600
commit2af7083d4543be9a1b1476de75fafb17bfe78b95 (patch)
treefc7a16d14e0be335240aacea41edc37cc76971aa /src/leap/mail/incoming
parent87c15e3ec5c1ca607890bf72b0d90bb0f114cbb1 (diff)
Use MessageCollection instead of IMAPMailbox in IncomingMail
Diffstat (limited to 'src/leap/mail/incoming')
-rw-r--r--src/leap/mail/incoming/service.py8
-rw-r--r--src/leap/mail/incoming/tests/test_incoming_mail.py2
2 files changed, 5 insertions, 5 deletions
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