Fix bug that made the issue content unavailable

This commit is contained in:
Jason Streifling 2024-10-30 03:23:59 +01:00
parent 81c046c1b0
commit b4003c8216

View File

@ -31,12 +31,11 @@ func GenerateAtomFeed(c *Config, db *DB) (*string, error) {
entry := atom.NewEntry(articleTitle)
entry.ID = atom.NewID(fmt.Sprint("urn:entry:", article.ID))
entry.Published = atom.NewDate(article.Created)
entry.Content = atom.NewContent(atom.OutOfLine, "text/hmtl", article.ContentLink)
if article.AutoGenerated {
entry.Content = atom.NewContent(atom.InlineText, "text", "")
entry.Summary = atom.NewText("text", "automatically generated")
} else {
entry.Content = atom.NewContent(atom.OutOfLine, "text/hmtl", article.ContentLink)
articleSummary, err := ConvertToPlain(article.Summary)
if err != nil {
return nil, fmt.Errorf("error converting description to plain text for Atom feed: %v", err)