even more search changes

This commit is contained in:
barisusakli
2015-03-15 01:12:13 -04:00
parent 2b7744f905
commit 78c65aee05
6 changed files with 81 additions and 83 deletions

View File

@@ -68,7 +68,13 @@ module.exports = function(Posts) {
topics.onNewPostMade(postData, next);
},
function(next) {
categories.onNewPostMade(postData, next);
topics.getTopicFields(tid, ['cid', 'pinned'], function(err, topicData) {
if (err) {
return next(err);
}
postData.cid = topicData.cid;
categories.onNewPostMade(topicData.cid, topicData.pinned, postData, next);
});
},
function(next) {
db.sortedSetAdd('posts:pid', timestamp, postData.pid, next);