From 389d979eb3eaa18beb8a6da9f4a03bdb6acc1722 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sat, 18 Apr 2015 21:59:22 +0200 Subject: Parsing utag_list from a detail page and showing the keys that are given in the configuration file --- src/AdListener.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/AdListener.hs') 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 -- cgit v1.2.3