mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 18:16:36 +02:00
fixing broken category
This commit is contained in:
@@ -561,20 +561,22 @@ var RDB = require('./redis.js')
|
|||||||
return callback(err, null);
|
return callback(err, null);
|
||||||
|
|
||||||
var stripped = postData.content,
|
var stripped = postData.content,
|
||||||
timestamp = postData.timestamp;
|
timestamp = postData.timestamp,
|
||||||
|
returnObj = {
|
||||||
|
"username": userData.username,
|
||||||
|
"picture": userData.picture,
|
||||||
|
"timestamp" : timestamp
|
||||||
|
};
|
||||||
|
|
||||||
if(postData.content) {
|
if(postData.content) {
|
||||||
stripped = postData.content.replace(/>.+\n\n/, '');
|
stripped = postData.content.replace(/>.+\n\n/, '');
|
||||||
postTools.toHTML(stripped, function(err, stripped) {
|
postTools.toHTML(stripped, function(err, stripped) {
|
||||||
stripped = utils.strip_tags(stripped);
|
returnObj.stripped = utils.strip_tags(stripped);
|
||||||
|
callback(null, returnObj);
|
||||||
callback(null, {
|
|
||||||
"text": stripped,
|
|
||||||
"username": userData.username,
|
|
||||||
"picture": userData.picture,
|
|
||||||
"timestamp" : timestamp
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
returnObj.stripped = '';
|
||||||
|
callback(null, returnObj);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user