Merge Upstream
This commit is contained in:
commit
95e3360ff7
@ -31,8 +31,13 @@ function remind:action(msg, config)
|
|||||||
elseif duration > config.remind.max_duration then
|
elseif duration > config.remind.max_duration then
|
||||||
duration = config.remind.max_duration
|
duration = config.remind.max_duration
|
||||||
end
|
end
|
||||||
local message = utilities.input(input)
|
|
||||||
if not message then
|
local message
|
||||||
|
if msg.reply_to_message and #msg.reply_to_message.text > 0 then
|
||||||
|
message = msg.reply_to_message.text
|
||||||
|
elseif utilities.input(input) then
|
||||||
|
message = utilities.input(input)
|
||||||
|
else
|
||||||
utilities.send_reply(msg, remind.doc, true)
|
utilities.send_reply(msg, remind.doc, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -10,6 +10,7 @@ function vtt:pre_process(msg, config)
|
|||||||
if not msg.voice then return msg end -- Ignore
|
if not msg.voice then return msg end -- Ignore
|
||||||
local mime_type = msg.voice.mime_type
|
local mime_type = msg.voice.mime_type
|
||||||
if mime_type ~= 'audio/ogg' then return msg end -- We only want to transcript voice messages
|
if mime_type ~= 'audio/ogg' then return msg end -- We only want to transcript voice messages
|
||||||
|
if msg.voice.duration > 90 then return msg end -- Only voice messages < 60 seconds
|
||||||
local file_id = msg.voice.file_id
|
local file_id = msg.voice.file_id
|
||||||
local file_size = msg.voice.file_size
|
local file_size = msg.voice.file_size
|
||||||
if file_size > 19922944 then
|
if file_size > 19922944 then
|
||||||
|
Reference in New Issue
Block a user