Skip to content

Commit

Permalink
Dont return anonymous comments with the list api
Browse files Browse the repository at this point in the history
  • Loading branch information
tiger5226 committed Sep 28, 2020
1 parent 6eb87d8 commit 0e93346
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/services/v1/comments/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ func (c *Service) List(_ *http.Request, args *commentapi.ListArgs, reply *commen
var channel *m.Channel
if comment.R != nil {
channel = comment.R.Channel
if channel != nil && channel.Name != "" {
items = append(items, populateItem(comment, channel))
}
}
items = append(items, populateItem(comment, channel))
}

reply.Items = items
Expand Down

0 comments on commit 0e93346

Please sign in to comment.