FIX: whispers should not be revealed in reply to, or reply expansion

FEATURE: mark whisper as experimental
FIX: badges should never apply to whispers
This commit is contained in:
Sam
2015-09-25 10:16:19 +10:00
parent 6b07575632
commit 2422289c8b
6 changed files with 40 additions and 14 deletions
+3 -2
View File
@@ -181,7 +181,7 @@ class PostsController < ApplicationController
def reply_history
post = find_post_from_params
render_serialized(post.reply_history(params[:max_replies].to_i), PostSerializer)
render_serialized(post.reply_history(params[:max_replies].to_i, guardian), PostSerializer)
end
def destroy
@@ -237,7 +237,8 @@ class PostsController < ApplicationController
# Direct replies to this post
def replies
post = find_post_from_params
render_serialized(post.replies, PostSerializer)
replies = post.replies.secured(guardian)
render_serialized(replies, PostSerializer)
end
def revisions