mirror of
https://github.com/wassname/talk.git
synced 2026-07-03 20:06:36 +08:00
Merge branch 'master' into user-pending
This commit is contained in:
@@ -35,7 +35,7 @@ const createAction = async ({user = {}, pubsub, loaders: {Comments}}, {item_id,
|
||||
|
||||
// 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){
|
||||
if(!user.isStaff()){
|
||||
await UsersService.setStatus(item_id, 'PENDING');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user