diff --git a/models/issue_comment.go b/models/issue_comment.go index 270a10e2401..a5b6588fa99 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -1124,6 +1124,10 @@ func fetchCodeCommentsByReview(e Engine, issue *Issue, currentUser *User, review return nil, err } + if err := comment.LoadReactions(issue.Repo); err != nil { + return nil, err + } + if re, ok := reviews[comment.ReviewID]; ok && re != nil { // If the review is pending only the author can see the comments (except the review is set) if review.ID == 0 { diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index 097d437a6db..69e87a7a705 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -30,7 +30,7 @@ {{end}} {{end}} - {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }} + {{template "repo/issue/view_content/add_reaction" Dict "ctx" $.root "ActionURL" (Printf "%s/comments/%d/reactions" $.root.RepoLink .ID) }} {{template "repo/issue/view_content/context_menu" Dict "ctx" $.root "item" . "delete" true "diff" true "IsCommentPoster" (and $.root.IsSigned (eq $.root.SignedUserID .PosterID))}} @@ -48,7 +48,7 @@ {{$reactions := .Reactions.GroupByType}} {{if $reactions}}