diff options
author | Kali Kaneko <kali@leap.se> | 2014-02-06 18:11:20 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-02-17 11:37:04 -0400 |
commit | ee0786c57d72aa8b8da76533f33c3dd65253a878 (patch) | |
tree | 258b23cf7d4368ea36f3bcd7caedcd3f4b188198 /src/leap/mail/imap/messages.py | |
parent | a5c45803dfdc62f22db592d1e542fcbd07170a43 (diff) |
long-due update to unittests!
So we're safe under the green lights before further rewriting.
:)
Diffstat (limited to 'src/leap/mail/imap/messages.py')
-rw-r--r-- | src/leap/mail/imap/messages.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/leap/mail/imap/messages.py b/src/leap/mail/imap/messages.py index cfad1dc..3fbe2ad 100644 --- a/src/leap/mail/imap/messages.py +++ b/src/leap/mail/imap/messages.py @@ -273,11 +273,19 @@ class LeapMessage(fields, MailParser, MBoxParser): """ Retrieve the date internally associated with this message - :rtype: C{str} + According to the spec, this is NOT the date and time in the + RFC-822 header, but rather a date and time that reflects when the + message was received. + + * In SMTP, date and time of final delivery. + * In COPY, internal date/time of the source message. + * In APPEND, date/time specified. + :return: An RFC822-formatted date string. + :rtype: str """ - date = self._hdoc.content.get(self.DATE_KEY, '') - return str(date) + date = self._hdoc.content.get(fields.DATE_KEY, '') + return date # # IMessagePart @@ -882,7 +890,6 @@ class MessageCollection(WithMsgFields, IndexedDB, MailParser, MBoxParser): leap_assert_type(flags, tuple) observer = defer.Deferred() - d = self._do_parse(raw) d.addCallback(self._do_add_msg, flags, subject, date, notify_on_disk, observer) |