From 2f93726a04b059c08915cb1f98fdc9ee8541befd Mon Sep 17 00:00:00 2001 From: Adhityaa Date: Thu, 7 Jun 2018 13:10:15 +0530 Subject: [PATCH] comment_list.go: do not leak state if not mod --- api/comment_list.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/comment_list.go b/api/comment_list.go index 1f1ed3f..484fcad 100644 --- a/api/comment_list.go +++ b/api/comment_list.go @@ -71,6 +71,10 @@ func commentList(commenterHex string, domain string, path string, includeUnappro } } + if !includeUnapproved { + c.State = "" + } + comments = append(comments, c) if _, ok := commenters[c.CommenterHex]; !ok {