diff options
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r-- | src/leap/bitmask/mua/pixelizer.py | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/leap/bitmask/mua/pixelizer.py b/src/leap/bitmask/mua/pixelizer.py index c2dd714..b9ceac9 100644 --- a/src/leap/bitmask/mua/pixelizer.py +++ b/src/leap/bitmask/mua/pixelizer.py @@ -51,6 +51,21 @@ try: from pixelated.resources.root_resource import RootResource import pixelated_www HAS_PIXELATED = True + + class _LeapMailStore(LeapMailStore): + + def __init__(self, soledad, account): + self.account = account + super(_LeapMailStore, self).__init__(soledad) + + # We should rewrite the LeapMailStore in the coming pixelated fork so + # that we reuse the account instance. + @defer.inlineCallbacks + def add_mail(self, mailbox_name, raw_msg): + inbox = yield self.account.get_collection_by_mailbox(mailbox_name) + yield inbox.add_msg(raw_msg, ('\\Recent',), notify_just_mdoc=False) + + except ImportError as exc: HAS_PIXELATED = False @@ -148,20 +163,6 @@ class NickNym(object): return self.keymanager.send_key() -class _LeapMailStore(LeapMailStore): - - def __init__(self, soledad, account): - self.account = account - super(_LeapMailStore, self).__init__(soledad) - - # We should rewrite the LeapMailStore in the coming pixelated fork so that - # we reuse the account instance. - @defer.inlineCallbacks - def add_mail(self, mailbox_name, raw_msg): - inbox = yield self.account.get_collection_by_mailbox(mailbox_name) - yield inbox.add_msg(raw_msg, ('\\Recent',), notify_just_mdoc=False) - - class LeapSessionAdapter(object): def __init__(self, userid, soledad, keymanager, account): |