change how attachments are passed in twisty
authorMark Hammond <mhammond@skippinet.com.au>
Sun, 29 Mar 2009 12:58:46 +1100
branchtwisty
changeset 133 6aadbb8ccb0bd5bd5266003338524d0ba09e7474
parent 132 6ad97bca58340ae42fda3081394719e7d874d9f2
child 134 a6f67d2b235c853adc0b058977df72f27d606972
push id1
push userroot
push dateWed, 08 Apr 2009 01:46:05 +0000
change how attachments are passed in
server/python/junius/proto/imap.py
--- a/server/python/junius/proto/imap.py
+++ b/server/python/junius/proto/imap.py
@@ -121,19 +121,19 @@ class ImapClient(imap4.IMAP4Client):
     doc = dict(
       storage_key=[folder_name, uid],
       imap_flags=flags,
       )
     attachments = {'rfc822' : {'content_type': 'message',
                                'data': content,
                                }
                   }
+    doc['_attachments'] = attachments
     return self.doc_model.create_raw_document(self.account,
                                               did, doc, 'proto/imap',
-                                              attachments=attachments,
                 ).addCallback(self._cb_saved_message)
 
   def _cantGetMessage(self, failure):
     logger.error("Failed to fetch message: %s", failure)
 
   def _cb_saved_message(self, result):
     logger.debug("Saved message %s", result)