summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/mail/mail.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/mail/mail.py')
-rw-r--r--src/leap/bitmask/mail/mail.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/leap/bitmask/mail/mail.py b/src/leap/bitmask/mail/mail.py
index 9a7b1aed..53b34132 100644
--- a/src/leap/bitmask/mail/mail.py
+++ b/src/leap/bitmask/mail/mail.py
@@ -1038,6 +1038,21 @@ class Account(object):
"""
raise NotImplementedError()
+ def get_message_by_msgid(self, mbox, msgid):
+ """
+ :rtype: Message
+ """
+ def get_msg_from_mdoc(mdoc_id):
+ if not mdoc_id:
+ return None
+
+ return self.adaptor.get_msg_from_mdoc_id(
+ Message, self.store, mdoc_id)
+
+ d = self.adaptor.get_mdoc_id_from_msgid(self.store, mbox, msgid)
+ d.addCallback(get_msg_from_mdoc)
+ return d
+
# Session handling
def end_session(self):