diff --git a/src/flags.js b/src/flags.js index 7e03e9cffd..ede0871b83 100644 --- a/src/flags.js +++ b/src/flags.js @@ -337,6 +337,9 @@ Flags.create = function (type, id, uid, reason, timestamp, callback) { } if (type === 'post') { tasks.push(async.apply(db.sortedSetAdd.bind(db), 'flags:byPid:' + id, timestamp, flagId)); // by target pid + if (targetUid) { + tasks.push(async.apply(db.sortedSetIncrBy, 'users:flags', 1, targetUid)); + } } async.parallel(tasks, function (err) {