mirror of
https://codeberg.org/librarian/feeds
synced 2024-12-06 19:16:24 +01:00
Omit Atom feed Author from xml when it is not specified.
This commit is contained in:
@@ -78,7 +78,7 @@ type AtomFeed struct {
|
||||
Rights string `xml:"rights,omitempty"` // copyright used
|
||||
Subtitle string `xml:"subtitle,omitempty"`
|
||||
Link *AtomLink
|
||||
Author *AtomAuthor // required
|
||||
Author *AtomAuthor `xml:"author,omitempty"`
|
||||
Contributor *AtomContributor
|
||||
Entries []*AtomEntry
|
||||
}
|
||||
@@ -145,8 +145,6 @@ func (a *Atom) AtomFeed() *AtomFeed {
|
||||
}
|
||||
if a.Author != nil {
|
||||
feed.Author = &AtomAuthor{AtomPerson: AtomPerson{Name: a.Author.Name, Email: a.Author.Email}}
|
||||
} else {
|
||||
feed.Author = &AtomAuthor{AtomPerson: AtomPerson{Name: "", Email: ""}}
|
||||
}
|
||||
for _, e := range a.Items {
|
||||
feed.Entries = append(feed.Entries, newAtomEntry(e))
|
||||
|
||||
Reference in New Issue
Block a user