Remove author completely when fields are missing
All checks were successful
the build was successful
All checks were successful
the build was successful
This commit is contained in:
parent
78cace26d9
commit
d7834ebf53
|
@ -328,7 +328,7 @@ func FeedItems(fetcher Fetcher, fetchURL, contentType string, body io.Reader) ([
|
|||
for i, v := range items {
|
||||
// Clear type of author, when other fields also aren't set
|
||||
if v.Author != nil && v.Author.Name == "" && v.Author.Photo == "" && v.Author.URL == "" {
|
||||
v.Author.Type = ""
|
||||
v.Author = nil
|
||||
items[i] = v
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user