|
|
@ -459,10 +459,11 @@ var async = require('async'),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Groups.create(groupName, '', function(err) {
|
|
|
|
Groups.create(groupName, '', function(err) {
|
|
|
|
if (err) {
|
|
|
|
if (err && err.message !== '[[error:group-already-exists]]') {
|
|
|
|
winston.error('[groups.join] Could not create new hidden group: ' + err.message);
|
|
|
|
winston.error('[groups.join] Could not create new hidden group: ' + err.message);
|
|
|
|
return callback(err);
|
|
|
|
return callback(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Groups.hide(groupName);
|
|
|
|
Groups.hide(groupName);
|
|
|
|
db.setAdd('group:' + groupName + ':members', uid, callback);
|
|
|
|
db.setAdd('group:' + groupName + ':members', uid, callback);
|
|
|
|
plugins.fireHook('action:groups.join', {
|
|
|
|
plugins.fireHook('action:groups.join', {
|
|
|
|