diff --git a/src/posts/delete.js b/src/posts/delete.js index e28f3f8e36..100a39eeb8 100644 --- a/src/posts/delete.js +++ b/src/posts/delete.js @@ -34,9 +34,6 @@ module.exports = function(Posts) { function(next) { db.sortedSetRemove('cid:' + topicData.cid + ':pids', pid, next); }, - function(next) { - Posts.dismissFlag(pid, next); - }, function(next) { topics.updateTeaser(postData.tid, next); } diff --git a/src/posts/flags.js b/src/posts/flags.js index 7c04eb8982..c5df336c16 100644 --- a/src/posts/flags.js +++ b/src/posts/flags.js @@ -133,7 +133,8 @@ module.exports = function(Posts) { ], next); }, async.apply(db.deleteObjectField, 'post:' + pid, 'flags'), - async.apply(db.delete, 'pid:' + pid + ':flag:uid:reason') + async.apply(db.delete, 'pid:' + pid + ':flag:uid:reason'), + async.apply(db.deleteObjectFields, 'post:' + pid, ['flag:state', 'flag:assignee', 'flag:notes', 'flag:history']) ], next); }, function(results, next) {