From 195be96423d49d0a00d5cc64a976044c215957af Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Sun, 26 Jun 2016 01:01:15 +0200 Subject: [PATCH] Heise: Fix, wenn kein Teaser-Text vorhanden --- otouto/plugins/heise.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/otouto/plugins/heise.lua b/otouto/plugins/heise.lua index baa8a7e..e9d04d3 100644 --- a/otouto/plugins/heise.lua +++ b/otouto/plugins/heise.lua @@ -17,11 +17,15 @@ function heise:get_heise_article(article) if code ~= 200 then return "HTTP-Fehler" end local title = data.h2 - local teaser = data.strong + if data.strong then + teaser = '\n'..data.strong + else + teaser = '' + end if data.img then image_url = 'https:'..data.img.src end - local text = '*'..title..'*\n'..teaser + local text = '*'..title..'*'..teaser if data.img then return text, image_url