Skip to content

Commit

Permalink
Verify post visibility when finding last visible post
Browse files Browse the repository at this point in the history
  • Loading branch information
louiecaulfield committed Sep 12, 2014
1 parent 6929197 commit 1145333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/forem/forum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def last_post_for(forem_user)
end

def last_visible_post(forem_user)
posts.approved_or_pending_review_for(forem_user).last
posts.visible.approved_or_pending_review_for(forem_user).last
end

def moderator?(user)
Expand Down

0 comments on commit 1145333

Please sign in to comment.