summaryrefslogtreecommitdiff
path: root/alot/db/message.py
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-03-06 09:10:29 +0100
committerAnton Khirnov <anton@khirnov.net>2020-03-06 09:13:30 +0100
commitd70f627c7a91e0aeed60c29e690be300c4008dab (patch)
treef6c7cedc87e60caf2d295598e6c92fe76a7f44aa /alot/db/message.py
parente2efd81f0dc4f913c73a2494091f67c748001942 (diff)
widgets/thread: use the headers object to access message headers
Avoid accessing the email directly.
Diffstat (limited to 'alot/db/message.py')
-rw-r--r--alot/db/message.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/alot/db/message.py b/alot/db/message.py
index c0bdb398..f2752e19 100644
--- a/alot/db/message.py
+++ b/alot/db/message.py
@@ -370,6 +370,9 @@ class _MessageHeaders:
def __init__(self, msg):
self._msg = msg
+ def __contains__(self, key):
+ return key in self._msg
+
def __getitem__(self, key):
if not key in self._msg:
raise KeyError(key)