Commit c608c152 authored by Nicolas Lenz's avatar Nicolas Lenz

Check for emptiness in InlineQueries

parent 7133b799
......@@ -56,7 +56,9 @@ replyToInline = UpdateParser f where
f update = do
inlineQuery <- Telegram.updateInlineQuery update
let txt = Telegram.inlineQueryQuery inlineQuery
return $ InlineReply $ map (\(name, f) -> (name, f txt)) styles
if T.empty == txt
then return $ InlineReply []
else return $ InlineReply $ map (\(name, f) -> (name, f txt)) styles
-- |Concatenates a list of Maybe functions. Execution goes from left to right.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment