Merge pull request #1142 from PepeFranco/reportedComments

Reported comments
This commit is contained in:
Kiwi
2017-11-01 12:17:25 +01:00
committed by GitHub
+5 -2
View File
@@ -33,8 +33,11 @@ const createAction = async ({user = {}, pubsub, loaders: {Comments}}, {item_id,
if (item_type === 'USERS' && action_type === 'FLAG') {
// Set the user as pending if it was a user flag.
await UsersService.setStatus(item_id, 'PENDING');
// Set the user as pending if it was a user flag and user has no Admin, Staff or Moderation roles
let user = await UsersService.findById(item_id);
if(!user.roles){
await UsersService.setStatus(item_id, 'PENDING');
}
}
if (comment) {