Remove author when no fields are set
This commit is contained in:
parent
c61fe38718
commit
5da097a91a
|
@ -325,6 +325,14 @@ func (b *memoryBackend) feedItems(fetchURL, contentType string, body io.Reader)
|
|||
} else {
|
||||
log.Printf("Unknown Content-Type: %s\n", contentType)
|
||||
}
|
||||
|
||||
for i, v := range items {
|
||||
// Clear type of author, when other fields also aren't set
|
||||
if v.Author.Name == "" && v.Author.Photo == "" && v.Author.URL == "" {
|
||||
v.Type = ""
|
||||
items[i] = v
|
||||
}
|
||||
}
|
||||
return items, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user