fix overlength summaries

pull/1/head
Starbeamrainbowlabs 2022-08-25 19:31:48 +01:00
parent 86787d85ea
commit 07508faf1a
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
1 changed files with 10 additions and 3 deletions

View File

@ -69,9 +69,16 @@ async function do_feeds() {
item.content = item.summary; item.content = item.summary;
} }
if(!item.description if(typeof item.description !== "string") {
|| (typeof item.description == "string" && item.description.length === 0)) item.description = striptags(item.content) if(typeof item.summary === "string")
.substring(0, DESCRIPTION_LENGTH); item.description = item.summary;
else if(typeof item.content === "string")
item.description = item.content;
}
item.description = striptags(item.content)
.substring(0, DESCRIPTION_LENGTH);
if(!item.pubdate) item.pubdate = item.published if(!item.pubdate) item.pubdate = item.published
|| item.updated || item.updated