Media: Fix

This commit is contained in:
Andreas Bielawski 2016-08-14 22:56:18 +02:00
parent c2bab342a9
commit 0fbd5e16cf

View File

@ -1,7 +1,5 @@
local media = {}
mimetype = (loadfile "./otouto/mimetype.lua")()
media.triggers = {
"(https?://[%w-_%.%?%.:,/%+=&%[%]]+%.(gif))$",
"^(https?://[%w-_%.%?%.:,/%+=&%[%]]+%.(mp4))$",
@ -25,7 +23,7 @@ media.triggers = {
function media:action(msg, config, matches)
local url = matches[1]
local ext = matches[2]
local mime_type = mimetype:get_content_type_no_sub(ext)
local mime_type = mimetype.get_content_type_no_sub(ext)
local receiver = msg.chat.id
if mime_type == 'audio' then