Commit f56370d4 authored by Nicolas Lenz's avatar Nicolas Lenz ❄️
Browse files

Merge branch 'master' of git.eisfunke.com:software/mock-telegram-bot

parents 6b4798d8 07c4c013
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -41,7 +41,9 @@ mockify = UpdateParser f where
        message <- Telegram.updateMessage update
        txt <- Telegram.messageText message
        let styleNames = T.splitOn "|" . T.toLower . head . T.words $ txt
        case concatMaybeFunctions . map (\s -> lookup s styles) $ styleNames of
        if length styleNames > 5 then
            return $ Reply "Only concatenations of up to 5 styles are allowed."
        else case concatMaybeFunctions . map (\s -> lookup s styles) $ styleNames of
            Nothing -> return $ SendHelp
            Just f -> return $ Reply $ f (T.unwords $ tail $ T.words txt)