Browse Source

Fix bug in GetFeeds() that 56955d3 broke (don't modify the feed config)

pull/21/head
James Mills 2 months ago
parent
commit
3d1226dff1
Signed by: prologic GPG Key ID: AC4C014F1440EBD6
  1. 9
      app.go

9
app.go

@ -122,10 +122,11 @@ func (app *App) GetFeeds() (feeds []Feed) {
lastModified := humanize.Time(stat.ModTime())
uri := fmt.Sprintf("%s/%s/twtxt.txt", app.conf.BaseURL, name)
if feed, ok := app.conf.Feeds[name]; ok {
feed.URI = uri
feed.LastModified = lastModified
feeds = append(feeds, *feed)
feed := Feed{Name: name, URI: uri, LastModified: lastModified}
if feedConfig, ok := app.conf.Feeds[name]; ok {
feed.Avatar = feedConfig.Avatar
feed.Description = feedConfig.Description
feeds = append(feeds, feed)
}
}

Loading…
Cancel
Save