summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-01-16 17:19:31 -0400
committerKali Kaneko <kali@leap.se>2014-01-16 17:19:31 -0400
commitb5f2c2596af6a7143718ca97e9ce15bcbaacfb9b (patch)
tree13ca9266a287ef83186958db4a3ca0b0f73bf8fa /mail
parentcfe173321dfcf55da571d0e42f93680e4452b5c1 (diff)
fix internaldate storage
Diffstat (limited to 'mail')
-rw-r--r--mail/src/leap/mail/imap/messages.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mail/src/leap/mail/imap/messages.py b/mail/src/leap/mail/imap/messages.py
index 02df38e..1b996b6 100644
--- a/mail/src/leap/mail/imap/messages.py
+++ b/mail/src/leap/mail/imap/messages.py
@@ -467,7 +467,8 @@ class LeapMessage(fields, MailParser, MBoxParser):
:rtype: C{str}
:return: An RFC822-formatted date string.
"""
- return str(self._hdoc.content.get(self.DATE_KEY, ''))
+ date = self._hdoc.content.get(self.DATE_KEY, '')
+ return str(date)
#
# IMessagePart
@@ -1077,12 +1078,12 @@ class MessageCollection(WithMsgFields, IndexedDB, MailParser, MBoxParser,
hd[self.MSGID_KEY] = msgid
if not subject and self.SUBJECT_FIELD in headers:
- hd[self.SUBJECT_KEY] = first(headers[self.SUBJECT_FIELD])
+ hd[self.SUBJECT_KEY] = headers[self.SUBJECT_FIELD]
else:
hd[self.SUBJECT_KEY] = subject
if not date and self.DATE_FIELD in headers:
- hd[self.DATE_KEY] = first(headers[self.DATE_FIELD])
+ hd[self.DATE_KEY] = headers[self.DATE_FIELD]
else:
hd[self.DATE_KEY] = date
return hd