moderation reports: pass CurrentUser to visible explicitly.

This is for consistency with how `visible` works in other models.
This commit is contained in:
evazion
2020-03-21 22:14:45 -05:00
parent 2445e8b82f
commit 94aff2c777
5 changed files with 8 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
$("#threshold-comments-notice-for-<%= @post.id %>").hide();
var current_comment_section = $("div.comments-for-post[data-post-id=<%= @post.id %>] div.list-of-comments");
current_comment_section.html("<%= j(render(partial: 'comments/partials/show/comment', collection: @comments, locals: { context: :index_for_post, dtext_data: DText.preprocess(@comments.map(&:body)), moderation_reports: @post.moderation_reports.visible.recent })) %>");
current_comment_section.html("<%= j(render(partial: 'comments/partials/show/comment', collection: @comments, locals: { context: :index_for_post, dtext_data: DText.preprocess(@comments.map(&:body)), moderation_reports: @post.moderation_reports.visible(CurrentUser.user).recent })) %>");
$(window).trigger("danbooru:index_for_post", [<%= @post.id %>]);