fixing broken category

This commit is contained in:
Julian Lam
2013-08-27 14:57:21 -04:00
parent 5f0e0c993e
commit 54fdbcd947

View File

@@ -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);
}
});
});