- Echo: Fix für Anführungszeichen in InlineQuerys

- Core: Kennzeichne Inline-Querys
This commit is contained in:
Andreas Bielawski
2016-07-13 01:21:50 +02:00
parent 7ce4411a65
commit 0f2e1460cb
2 changed files with 5 additions and 2 deletions

View File

@ -16,7 +16,10 @@ end
function echo:inline_callback(inline_query, config, matches)
local text = matches[1]
local results = '['
if text:match('"') then
text = text:gsub('"', '\\"')
end
-- enable custom markdown button
if text:match('%[.*%]%(.*%)') or text:match('%*.*%*') or text:match('_.*_') or text:match('`.*`') then
results = results..'{"type":"article","id":"'..math.random(100000000000000000)..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/echo/custom.jpg","title":"Eigenes Markdown","description":"'..text..'","input_message_content":{"message_text":"'..text..'","parse_mode":"Markdown"}},'