WordPress_Posts: Sende Text und Bild immer getrennt (wegen 200-Zeichen-Limit bei Captions)

This commit is contained in:
Andreas Bielawski 2016-08-16 01:02:24 +02:00
parent 5b87557194
commit 8800ce6f45

View File

@ -38,13 +38,7 @@ function wordpress_recent_post:get_full_url(blog)
end
local text = '<b>'..title..'</b>\n<i>'..from..' am '..posted_at..'</i>\n'..content..'...\n<a href="'..url..'">Artikel aufrufen</a>'
if image_url then
local text = title..' ('..from..' am '..posted_at..')\n\n'..content..'...\n'..url -- captions don't support markdown
return text, image_url
else
return text
end
return text, image_url
end
function wordpress_recent_post:action(msg, config, matches)
@ -63,9 +57,8 @@ function wordpress_recent_post:action(msg, config, matches)
utilities.send_typing(self, msg.chat.id, 'upload_photo')
local file = download_to_file(image_url)
utilities.send_photo(self, msg.chat.id, file, text, msg.message_id)
else
utilities.send_reply(self, msg, text, 'HTML')
end
utilities.send_reply(self, msg, text, 'HTML')
end
return wordpress_recent_post