mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
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
This commit is contained in:
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user