fix: flags detail page crash if reporter blocks author

Fixed an issue where the flags detail page would crash if the
reporting user flagged a post and then proceeded to block the
post author.

Retrieval of a flag's target data should be irrespective of
block status.

fixes #6925
v1.18.x
Julian Lam 6 years ago
parent f7bd398eb1
commit d027207f88

@ -90,7 +90,7 @@ Flags.get = function (flagId, callback) {
// Second stage
async.parallel({
userObj: async.apply(user.getUserFields, data.base.uid, ['username', 'userslug', 'picture', 'reputation']),
targetObj: async.apply(Flags.getTarget, data.base.type, data.base.targetId, data.base.uid),
targetObj: async.apply(Flags.getTarget, data.base.type, data.base.targetId, 0),
}, function (err, payload) {
// Final object return construction
next(err, Object.assign(data.base, {

Loading…
Cancel
Save