mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +01:00
closes #856
This commit is contained in:
@@ -207,18 +207,22 @@ var winston = require('winston'),
|
||||
});
|
||||
});
|
||||
|
||||
// Restore topic if it is the only post
|
||||
topics.getTopicField(postData.tid, 'postcount', function(err, count) {
|
||||
if (parseInt(count, 10) === 1) {
|
||||
threadTools.restore(postData.tid, uid);
|
||||
}
|
||||
});
|
||||
|
||||
Feed.updateTopic(postData.tid);
|
||||
Feed.updateRecent();
|
||||
|
||||
db.searchIndex('post', postData.content, pid);
|
||||
|
||||
// Restore topic if it is the only post
|
||||
topics.getTopicField(postData.tid, 'postcount', function(err, count) {
|
||||
if (parseInt(count, 10) === 1) {
|
||||
threadTools.restore(postData.tid, uid, function(err) {
|
||||
if(err) {
|
||||
winston.err(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user