Improved ordering of 9gag messages. Useful when upload speed is low
This commit is contained in:
parent
a5bcd9f05c
commit
a2f88c1370
@ -12,12 +12,19 @@ function get_9GAG()
|
|||||||
return link_image, title
|
return link_image, title
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function send_title(cb_extra, success, result)
|
||||||
|
--if success then
|
||||||
|
print("return called")
|
||||||
|
send_msg(cb_extra[1], cb_extra[2], ok_cb, false)
|
||||||
|
--end
|
||||||
|
end
|
||||||
|
|
||||||
function run(msg, matches)
|
function run(msg, matches)
|
||||||
local receiver = get_receiver(msg)
|
local receiver = get_receiver(msg)
|
||||||
url, title = get_9GAG()
|
url, title = get_9GAG()
|
||||||
file_path = download_to_file(url)
|
file_path = download_to_file(url)
|
||||||
send_photo(receiver, file_path, ok_cb, false)
|
send_photo(receiver, file_path, send_title, {receiver, title})
|
||||||
return title
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Reference in New Issue
Block a user