if user is already part of group skip instead of error

v1.18.x
barisusakli 8 years ago
parent 0da9bf2698
commit a254222911

@ -189,9 +189,9 @@ module.exports = function(Groups) {
if (!checks.exists) { if (!checks.exists) {
return next(new Error('[[error:no-group]]')); return next(new Error('[[error:no-group]]'));
} else if (checks.isMember) { } else if (checks.isMember) {
return next(new Error('[[error:group-already-member]]')); return callback();
} else if (type === 'invite' && checks.isInvited) { } else if (type === 'invite' && checks.isInvited) {
return next(new Error('[[error:group-already-invited]]')); return callback();
} else if (type === 'request' && checks.isPending) { } else if (type === 'request' && checks.isPending) {
return next(new Error('[[error:group-already-requested]]')); return next(new Error('[[error:group-already-requested]]'));
} }

Loading…
Cancel
Save