thread delete restore fix

This commit is contained in:
Baris Soner Usakli
2014-01-01 14:15:53 -05:00
parent fd88aff195
commit e2fb617cc0
3 changed files with 6 additions and 5 deletions

View File

@@ -152,7 +152,7 @@ var winston = require('winston'),
// Delete the thread if it is the last undeleted post
threadTools.getLatestUndeletedPid(postData.tid, function(err, pid) {
if (err && err.message === 'no-undeleted-pids-found') {
threadTools.delete(postData.tid, function(err) {
threadTools.delete(postData.tid, uid, function(err) {
if (err) {
winston.error('Could not delete topic (tid: ' + postData.tid + ')', err.stack);
}