maybe this is a little better

This commit is contained in:
nek0 2017-08-04 07:05:04 +02:00
parent a6a30a7705
commit 866d85945c

View file

@ -73,9 +73,8 @@ transferForm = areq currencyField (bfs MsgValue) (Just 0)
notify :: User -> User -> Int -> App -> IO ()
notify sender rcpt amount master = do
case userEmail sender of
Just email ->
liftIO $ sendMail email "Guthabentransfer beim Matematen"
when (isJust $ userEmail sender) $
liftIO $ sendMail (fromJust $ userEmail sender) "Guthabentransfer beim Matematen"
[stext|
Hallo #{userIdent sender}
@ -85,11 +84,8 @@ Viele Grüße,
Dein Matemat
|]
Nothing ->
return ()
case userEmail rcpt of
Just email ->
liftIO $ sendMail email "Guthabentransfer eingetroffen"
when (isJust $ userEmail rcpt) $
liftIO $ sendMail (fromJust $ userEmail rcpt) "Guthabentransfer eingetroffen"
[stext|
Hallo #{userIdent rcpt}
@ -99,5 +95,3 @@ Viele Grüße,
Dein Matemat
|]
Nothing ->
return ()