diff options
author | Joris Guyonvarch | 2015-04-18 21:59:22 +0200 |
---|---|---|
committer | Joris Guyonvarch | 2015-04-18 21:59:22 +0200 |
commit | 389d979eb3eaa18beb8a6da9f4a03bdb6acc1722 (patch) | |
tree | 9d475b868ad13162c0ecba42b2138058c2e2e68b /src/AdListener.hs | |
parent | 86f9991deeb44a6cc81044e61a9ad3ee001c5ced (diff) | |
download | ad-listener-389d979eb3eaa18beb8a6da9f4a03bdb6acc1722.tar.gz ad-listener-389d979eb3eaa18beb8a6da9f4a03bdb6acc1722.tar.bz2 ad-listener-389d979eb3eaa18beb8a6da9f4a03bdb6acc1722.zip |
Parsing utag_list from a detail page and showing the keys that are given in the configuration file
Diffstat (limited to 'src/AdListener.hs')
-rw-r--r-- | src/AdListener.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/AdListener.hs b/src/AdListener.hs index 4fc9b20..eee2de4 100644 --- a/src/AdListener.hs +++ b/src/AdListener.hs @@ -65,7 +65,7 @@ listenToNewAdsWithResumes config viewedURLs resumes = time <- getCurrentFormattedTime if not (null newAds) then - let message = P.renderConsoleAds time newAds + let message = P.renderConsoleAds config time newAds in do T.putStrLn message trySendMail config newAds @@ -77,11 +77,11 @@ listenToNewAdsWithResumes config viewedURLs resumes = trySendMail :: Config -> [Ad] -> IO () trySendMail config ads = case C.mailTo config of - Nothing -> + [] -> return () - Just mailTo -> - let (title, plainBody) = P.renderAds ads - htmlBody = H.renderAds ads + mailTo -> + let (title, plainBody) = P.renderAds config ads + htmlBody = H.renderAds config ads in do eitherMailSuccess <- sendMail mailTo title plainBody htmlBody case eitherMailSuccess of |