diff --git a/src/Util.hs b/src/Util.hs index 310bb68..bf1d029 100644 --- a/src/Util.hs +++ b/src/Util.hs @@ -107,7 +107,8 @@ sendAdminNotification -> T.Text -- The mail body -> MateHandler () sendAdminNotification subject message = do - allUsers <- userGetAll + conn <- asks rsConnection + allUsers <- userDetailsSelectAll conn admins <- mapM (\uid -> checkCapability uid roleCanManageSettings. userDetailsId) allUsers @@ -122,7 +123,8 @@ sendAdminNotification subject message = do ] , mailCc = [] , mailBcc =[] - , mailHeaders = + , mailHeaders = [("Subject", subject)] + , mailParts = [[ Part { partType = "text/plain; charset=utf8" , partEncoding = None @@ -135,7 +137,7 @@ sendAdminNotification subject message = do in sendNotification mail ) - allUsers + admins sendNotification :: Mail -> MateHandler () sendNotification mail = do