summaryrefslogtreecommitdiffstats
path: root/Notmuch
diff options
context:
space:
mode:
Diffstat (limited to 'Notmuch')
-rw-r--r--Notmuch/Message.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Notmuch/Message.hs b/Notmuch/Message.hs
index dd1e809..8c3d1ed 100644
--- a/Notmuch/Message.hs
+++ b/Notmuch/Message.hs
@@ -105,7 +105,9 @@ instance FromJSON Message where
parseJSON (Array _) = return $ Message (MessageID "") defTime M.empty [] True False [] ""
where defTime = UTCTime (ModifiedJulianDay 0) (fromInteger 0)
parseJSON x = fail $ "Error parsing message: " ++ show x
-
+
+hasTag :: T.Text -> Message -> Bool
+hasTag tag = (tag `elem`) . messageTags