From 8800ce6f45b5bc6ab2c28276d6740950af636a12 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Tue, 16 Aug 2016 01:02:24 +0200 Subject: [PATCH] WordPress_Posts: Sende Text und Bild immer getrennt (wegen 200-Zeichen-Limit bei Captions) --- miku/plugins/wordpress_posts.lua | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/miku/plugins/wordpress_posts.lua b/miku/plugins/wordpress_posts.lua index 2f6e9c5..122702c 100644 --- a/miku/plugins/wordpress_posts.lua +++ b/miku/plugins/wordpress_posts.lua @@ -38,13 +38,7 @@ function wordpress_recent_post:get_full_url(blog) end local text = ''..title..'\n'..from..' am '..posted_at..'\n'..content..'...\nArtikel aufrufen' - - 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 \ No newline at end of file