diff options
author | 2023-12-05 11:45:33 +0100 | |
---|---|---|
committer | 2023-12-05 11:45:33 +0100 | |
commit | bffc67d764221fa9c1ad3ad65702b3a157bb2d79 (patch) | |
tree | 84650cf72a09fc2cc91b7e6127c7bf0859b512fa /vendor/github.com/gorilla/feeds/rss.go | |
parent | [docs] Change configuration creation instructions (#2408) (diff) | |
download | gotosocial-bffc67d764221fa9c1ad3ad65702b3a157bb2d79.tar.xz |
[chore]: Bump github.com/gorilla/feeds from 1.1.1 to 1.1.2 (#2414)
Bumps [github.com/gorilla/feeds](https://github.com/gorilla/feeds) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/gorilla/feeds/releases)
- [Commits](https://github.com/gorilla/feeds/compare/v1.1.1...v1.1.2)
---
updated-dependencies:
- dependency-name: github.com/gorilla/feeds
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/gorilla/feeds/rss.go')
-rw-r--r-- | vendor/github.com/gorilla/feeds/rss.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/github.com/gorilla/feeds/rss.go b/vendor/github.com/gorilla/feeds/rss.go index 09179dfb2..8c227a8b7 100644 --- a/vendor/github.com/gorilla/feeds/rss.go +++ b/vendor/github.com/gorilla/feeds/rss.go @@ -95,11 +95,13 @@ type Rss struct { func newRssItem(i *Item) *RssItem { item := &RssItem{ Title: i.Title, - Link: i.Link.Href, Description: i.Description, Guid: i.Id, PubDate: anyTimeFormat(time.RFC1123Z, i.Created, i.Updated), } + if i.Link != nil { + item.Link = i.Link.Href + } if len(i.Content) > 0 { item.Content = &RssContent{Content: i.Content} } @@ -135,9 +137,13 @@ func (r *Rss) RssFeed() *RssFeed { image = &RssImage{Url: r.Image.Url, Title: r.Image.Title, Link: r.Image.Link, Width: r.Image.Width, Height: r.Image.Height} } + var href string + if r.Link != nil { + href = r.Link.Href + } channel := &RssFeed{ Title: r.Title, - Link: r.Link.Href, + Link: href, Description: r.Description, ManagingEditor: author, PubDate: pub, |