http -> https

This commit is contained in:
Akamaru 2016-09-29 13:56:36 +02:00
parent 1e74b18bad
commit 51f88ec863

View File

@ -16,7 +16,7 @@ local api_key = cred_data.iframely_api_key
function preview:inline_callback(inline_query, config, matches) function preview:inline_callback(inline_query, config, matches)
local preview_url = matches[1] local preview_url = matches[1]
local res, code = http.request('http://iframe.ly/api/oembed?url='..URL.escape(preview_url)..'&api_key='..api_key) local res, code = https.request('https://iframe.ly/api/oembed?url='..URL.escape(preview_url)..'&api_key='..api_key)
if code ~= 200 then abort_inline_query(inline_query) return end if code ~= 200 then abort_inline_query(inline_query) return end
local data = json.decode(res) local data = json.decode(res)
@ -49,7 +49,7 @@ function preview:inline_callback(inline_query, config, matches)
local message_text = '<b>'..title..'</b>'..description_in_text..'\n<i>- '..provider_name..'</i>' local message_text = '<b>'..title..'</b>'..description_in_text..'\n<i>- '..provider_name..'</i>'
local results = '[{"type":"article","id":"77","title":"'..title..'","description":"'..description..'","url":"'..preview_url..'","thumb_url":"'..thumb..'","thumb_width":150,"thumb_height":150,"hide_url":true,"reply_markup":{"inline_keyboard":[[{"text":"Webseite aufrufen","url":"'..preview_url..'"}]]},"input_message_content":{"message_text":"'..message_text..'","parse_mode":"HTML","disable_web_page_preview":true}}]' local results = '[{"type":"article","id":"77","title":"'..title..'","description":"'..description..'","url":"'..preview_url..'","thumb_url":"'..thumb..'","thumb_width":150,"thumb_height":150,"hide_url":true,"reply_markup":{"inline_keyboard":[[{"text":"Webseite aufrufen","url":"'..preview_url..'"}]]},"input_message_content":{"message_text":"'..message_text..'","parse_mode":"HTML","disable_web_page_preview":true}}]'
utilities.answer_inline_query(inline_query, results, 3600, true) utilities.answer_inline_query(inline_query, results, data.cache_age)
end end
function preview:action(msg) function preview:action(msg)