summaryrefslogtreecommitdiffstats
path: root/Notmuch
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-03-08 15:19:13 +0100
committertv <tv@shackspace.de>2015-03-08 15:19:13 +0100
commit6ba8281b5d87f1dd15a9b608aa82f9a883d00543 (patch)
tree0d3e4bb479f454b9d8af17b46aaac76ff1c18374 /Notmuch
parent74f1d114945f5bc384e5690f60f539e2d32d27d1 (diff)
test5 attachFilesToDraft: use ExcepT
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