From 54fdbcd947a62e163e804b287c8be0eec3d508da Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 27 Aug 2013 14:57:21 -0400 Subject: [PATCH] fixing broken category --- src/topics.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/topics.js b/src/topics.js index a52e32c81a..9f26064016 100644 --- a/src/topics.js +++ b/src/topics.js @@ -561,20 +561,22 @@ var RDB = require('./redis.js') return callback(err, null); var stripped = postData.content, - timestamp = postData.timestamp; + timestamp = postData.timestamp, + returnObj = { + "username": userData.username, + "picture": userData.picture, + "timestamp" : timestamp + }; if(postData.content) { stripped = postData.content.replace(/>.+\n\n/, ''); postTools.toHTML(stripped, function(err, stripped) { - stripped = utils.strip_tags(stripped); - - callback(null, { - "text": stripped, - "username": userData.username, - "picture": userData.picture, - "timestamp" : timestamp - }); + returnObj.stripped = utils.strip_tags(stripped); + callback(null, returnObj); }); + } else { + returnObj.stripped = ''; + callback(null, returnObj); } }); });