summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-21 18:39:27 -0300
committerBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-21 18:39:27 -0300
commit02e8df76adff7c4ee80e496736e7eaf939ad67de (patch)
treedecc8d79f4abb38855e307a5ab032d49070cd886 /src
parent597a0aa1ccd125ce83727128c0cddccc9ef29796 (diff)
MessageCollection iterators must instantiate LeapMessage with the collection
Diffstat (limited to 'src')
-rw-r--r--src/leap/mail/imap/messages.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/mail/imap/messages.py b/src/leap/mail/imap/messages.py
index b0b2f95..11dcd8f 100644
--- a/src/leap/mail/imap/messages.py
+++ b/src/leap/mail/imap/messages.py
@@ -1337,7 +1337,7 @@ class MessageCollection(WithMsgFields, IndexedDB, MBoxParser):
:returns: a list of LeapMessages
:rtype: list
"""
- return [LeapMessage(self._soledad, docid, self.mbox)
+ return [LeapMessage(self._soledad, docid, self.mbox, collection=self)
for docid in self.unseen_iter()]
# recent messages
@@ -1370,7 +1370,7 @@ class MessageCollection(WithMsgFields, IndexedDB, MBoxParser):
:returns: iterator of dicts with content for all messages.
:rtype: iterable
"""
- return (LeapMessage(self._soledad, docuid, self.mbox)
+ return (LeapMessage(self._soledad, docuid, self.mbox, collection=self)
for docuid in self.all_uid_iter())
def __repr__(self):