From 385b358b3c736f047d96c5bee8d672cf60132c67 Mon Sep 17 00:00:00 2001 From: boypt <1033514+boypt@users.noreply.github.com> Date: Thu, 19 Dec 2019 15:10:18 +0800 Subject: [PATCH] only publish to telegraph if html len > config.PreviewText --- model/content.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/content.go b/model/content.go index 057afe89..a6a2e586 100644 --- a/model/content.go +++ b/model/content.go @@ -28,7 +28,8 @@ func getContentByFeedItem(source *Source, item *rss.Item) (Content, error) { html = strings.Replace(html, "", "", -1) - if config.EnableTelegraph { + + if config.EnableTelegraph && len([]rune(html)) > config.PreviewText { tgpUrl = PublishItem(source, item, html) }