- Deaktiviere "Loading plugin" Meldung, da diese den Start und Reload des Bots verzögert

- Facebook: Wenn Bild privat ist, ignoriere es einfach
This commit is contained in:
Andreas Bielawski 2016-06-23 21:34:54 +02:00
parent 0f10b819b9
commit 4c22288396
2 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,7 @@ function bot:init(config) -- The function run when the bot is started or reloade
enabled_plugins = load_plugins()
for k,v in pairs(enabled_plugins) do
local p = require('otouto.plugins.'..v)
print('loading plugin',v)
-- print('loading plugin',v)
table.insert(self.plugins, p)
self.plugins[k].name = v
if p.init then p.init(self, config) end

View File

@ -156,8 +156,9 @@ function facebook:action(msg, config, matches)
else
photo_id = matches[4]
end
utilities.send_typing(self, msg.chat.id, 'upload_photo')
local text, image_url = facebook:send_facebook_photo(photo_id, receiver)
if not image_url then return end
utilities.send_typing(self, msg.chat.id, 'upload_photo')
local file = download_to_file(image_url)
utilities.send_reply(self, msg, text, true)
utilities.send_photo(self, msg.chat.id, file, nil, msg.message_id)