aboutsummaryrefslogtreecommitdiff
path: root/src/AdListener.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/AdListener.hs')
-rw-r--r--src/AdListener.hs10
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