summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/mail/utils.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-12-08 18:10:13 +0100
committerKali Kaneko <kali@leap.se>2017-12-20 15:27:06 +0100
commitd2e5f8406b6101971c196f40e39322e36d6bdb33 (patch)
treecfe3fb852f80effd52b7a75688cd2a5118fe9a1f /src/leap/bitmask/mail/utils.py
parentd5bd7394344afd2c6466f368a0de7566094a0d0d (diff)
[feat] Add msg_status call to the mail API
To get the status of a single message providing it's mailbox and message-id. For now it only returns encryption/signature status. - Resolves: #6914
Diffstat (limited to 'src/leap/bitmask/mail/utils.py')
-rw-r--r--src/leap/bitmask/mail/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/leap/bitmask/mail/utils.py b/src/leap/bitmask/mail/utils.py
index 64fca981..d5128573 100644
--- a/src/leap/bitmask/mail/utils.py
+++ b/src/leap/bitmask/mail/utils.py
@@ -373,3 +373,8 @@ class CaseInsensitiveDict(dict):
def __getitem__(self, key):
return super(CaseInsensitiveDict, self).__getitem__(key.lower())
+
+ def get(self, key, default=None):
+ if key.lower() in self:
+ return self[key]
+ return default