summaryrefslogtreecommitdiffstats
path: root/Notmuch
diff options
context:
space:
mode:
Diffstat (limited to 'Notmuch')
-rw-r--r--Notmuch/Message.hs2
-rw-r--r--Notmuch/SearchResult.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Notmuch/Message.hs b/Notmuch/Message.hs
index d458c5f..29ca5ec 100644
--- a/Notmuch/Message.hs
+++ b/Notmuch/Message.hs
@@ -90,7 +90,7 @@ instance Eq Message where
instance FromJSON Message where
- parseJSON (Object v) = Message <$> v .: "id"
+ parseJSON (Object v) = Message <$> (MessageID . ("id:"<>) <$> v .: "id")
<*> (posixSecondsToUTCTime . fromInteger <$> v .: "timestamp")
<*> (M.mapKeys CI.mk <$> v .: "headers")
<*> v .: "body"
diff --git a/Notmuch/SearchResult.hs b/Notmuch/SearchResult.hs
index 6d3f9be..3a75e96 100644
--- a/Notmuch/SearchResult.hs
+++ b/Notmuch/SearchResult.hs
@@ -34,7 +34,7 @@ instance Eq SearchResult where
instance FromJSON SearchResult where
- parseJSON (Object v) = SearchResult <$> v .: "thread"
+ parseJSON (Object v) = SearchResult <$> ((ThreadID . ("thread:"++)) <$> v .: "thread")
<*> (posixSecondsToUTCTime . fromInteger <$> v .: "timestamp")
<*> v .: "date_relative"
<*> v .:? "subject" .!= ""