mirror of
https://salsa.debian.org/mdosch/feed-to-muc.git
synced 2024-11-22 22:18:39 +01:00
Don't post empty articles.
This commit is contained in:
parent
d3f1b75d17
commit
5c629fe1cd
1 changed files with 6 additions and 0 deletions
|
@ -211,6 +211,12 @@ func getArticles(feedURL string, max int, noExcerpt bool) (string, error) {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the content is empty after html2text (e.g. consisting of an image only)
|
||||||
|
// then stop processing
|
||||||
|
if strings.Replace(mastodonContent, " ", "", -1) == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
output = output + mastodonContent + "\n\n" + cleanURL
|
output = output + mastodonContent + "\n\n" + cleanURL
|
||||||
|
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
|
|
Loading…
Reference in a new issue