Bugfix für Images & Media
This commit is contained in:
parent
33ea8a0876
commit
b9dbaa3244
@ -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)
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user