diff options
author | drebs <drebs@leap.se> | 2013-08-19 09:09:50 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-08-21 14:42:39 -0300 |
commit | 410908917841bc2decbd4d00e04f75e2e6f1b88d (patch) | |
tree | ddda45b5bdcaa434bd00d1f67d14c85e2d4e5e18 /src/leap/mail/imap/fetch.py | |
parent | 5db4bbed6eb1cfe707dfb8cb92a978e4313607d0 (diff) |
Update to new soledad package scheme.
Diffstat (limited to 'src/leap/mail/imap/fetch.py')
-rw-r--r-- | src/leap/mail/imap/fetch.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/leap/mail/imap/fetch.py b/src/leap/mail/imap/fetch.py index 267af38..96568d5 100644 --- a/src/leap/mail/imap/fetch.py +++ b/src/leap/mail/imap/fetch.py @@ -29,7 +29,8 @@ from twisted.internet.threads import deferToThread from leap.common import events as leap_events from leap.common.check import leap_assert, leap_assert_type -from leap.soledad import Soledad +from leap.soledad.client import Soledad +from leap.soledad.common.crypto import ENC_SCHEME_KEY, ENC_JSON_KEY from leap.common.events.events_pb2 import IMAP_FETCHED_INCOMING from leap.common.events.events_pb2 import IMAP_MSG_PROCESSING @@ -46,9 +47,6 @@ class LeapIncomingMail(object): Fetches mail from the incoming queue. """ - ENC_SCHEME_KEY = "_enc_scheme" - ENC_JSON_KEY = "_enc_json" - RECENT_FLAG = "\\Recent" INCOMING_KEY = "incoming" @@ -156,11 +154,11 @@ class LeapIncomingMail(object): leap_events.signal( IMAP_MSG_PROCESSING, str(index), str(num_mails)) keys = doc.content.keys() - if self.ENC_SCHEME_KEY in keys and self.ENC_JSON_KEY in keys: + if ENC_SCHEME_KEY in keys and ENC_JSON_KEY in keys: # XXX should check for _enc_scheme == "pubkey" || "none" # that is what incoming mail uses. - encdata = doc.content[self.ENC_JSON_KEY] + encdata = doc.content[ENC_JSON_KEY] d = defer.Deferred(self._decrypt_msg(doc, encdata)) d.addCallbacks(self._process_decrypted, log.msg) else: |