From d7a4e39e1d2a684d23f3747cda93d952ea47199b Mon Sep 17 00:00:00 2001
From: riking <rikingcoding@gmail.com>
Date: Fri, 7 Nov 2014 07:28:07 -0800
Subject: [PATCH] FEATURE: ?include_raw parameter for /t/id/posts.json

include_raw is not added for the wordpress view because it uses the
BasicPostSerializer, and is not a one-line change.

This is the only use of the TopicViewPostsSerializer class, and the
previous change covered the only use of the TopicViewSerializer class.
No other locations include the PostStreamSerializerMixin. Therefore,
this feature is most likely complete.
---
 app/controllers/topics_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb
index e4e31cb55..c7e3d9916 100644
--- a/app/controllers/topics_controller.rb
+++ b/app/controllers/topics_controller.rb
@@ -110,7 +110,7 @@ class TopicsController < ApplicationController
     params.require(:post_ids)
 
     @topic_view = TopicView.new(params[:topic_id], current_user, post_ids: params[:post_ids])
-    render_json_dump(TopicViewPostsSerializer.new(@topic_view, scope: guardian, root: false))
+    render_json_dump(TopicViewPostsSerializer.new(@topic_view, scope: guardian, root: false, include_raw: !!params[:include_raw]))
   end
 
   def destroy_timings