webshot.lua: Dateiname Fix

expand.lua: t.co Pattern
This commit is contained in:
Akamaru 2016-11-04 20:22:00 +01:00
parent bbb00530fc
commit a8daf23680
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,8 @@ local expand = {}
function expand:init(config)
expand.triggers = {
'^/[Ee][Xx][Pp][Aa][Nn][Dd] (https?://[%w-_%.%?%.:/%+=&]+)$'
'^/[Ee][Xx][Pp][Aa][Nn][Dd] (https?://[%w-_%.%?%.:/%+=&]+)$',
'(https?://t.co/.*)'
}
expand.inline_triggers = {
'^ex (https?://[%w-_%.%?%.:/%+=&]+)$'

View File

@ -61,7 +61,7 @@ function webshot:action(msg, config, matches)
local find = webshot:get_webshot_url(webshot_url, size)
if find then
local imgurl = base .. find
local file = download_to_file(imgurl)
local file = download_to_file(imgurl, 'webshot.png')
if size == "F" then
utilities.send_document(msg.chat.id, file, nil, msg.message_id)
return