store all iamp flags instead of a single 'read' attribute. twisty
authorMark Hammond <mhammond@skippinet.com.au>
Thu, 12 Mar 2009 22:31:48 +1100
branchtwisty
changeset 86 021e64e9ecb8fa95f7a15f1590192fa6f4ac96e6
parent 85 f53ee9233c400d8ad5550b173e27cdd149e69d50
child 87 14e5d7be81ff23c6ab69a7f7b44be8511c5a7818
push id1
push userroot
push dateWed, 08 Apr 2009 01:46:05 +0000
store all iamp flags instead of a single 'read' attribute.
server/python/junius/proto/imap.py
--- a/server/python/junius/proto/imap.py
+++ b/server/python/junius/proto/imap.py
@@ -149,17 +149,17 @@ class ImapClient(imap4.IMAP4Client):
     # put the 'raw' document object together and save it.
     doc = dict(
       type='rawMessage',
       subtype='rfc822',
       account_id=self.account.details['_id'],
       storage_path=self.current_folder_path,
       storage_id=result['UID'],
       rfc822=body,
-      read=r'\Seen' in flags,
+      imap_flags=flags,
       )
     get_db().saveDoc(doc
             ).addCallback(self._savedDocument
             ).addErrback(self._cantSaveDocument
             )
 
   def _cantGetMessage(self, failure):
     logger.error("Failed to fetch message: %s", failure)