Bugfix für Images & Media

This commit is contained in:
Andreas Bielawski 2016-08-08 21:27:56 +02:00
parent 33ea8a0876
commit b9dbaa3244
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ images.triggers = {
"(https?://[%w-_%%%.%?%.:,/%+=~&%[%]]+%.[Jj][Pp][Ee]?[Gg])$"
}
function images:action(msg)
function images:action(msg, config, matches)
local url = matches[1]
local file, last_modified, nocache = get_cached_file(url, nil, msg.chat.id, 'upload_photo', self)
local result = utilities.send_photo(self, msg.chat.id, file, nil, msg.message_id)

View File

@ -22,7 +22,7 @@ media.triggers = {
"(https?://[%w-_%.%?%.:,/%+=&%[%]]+%.(webp))$"
}
function media:action(msg)
function media:action(msg, config, matches)
local url = matches[1]
local ext = matches[2]
local mime_type = mimetype.get_content_type_no_sub(ext)