From fa87d883dcfc4565ad3f28104b557ff33253899e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 15 Jan 2015 13:22:10 -0500 Subject: [PATCH] allowing "hidden" to be passed directly to Groups.create --- src/groups.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/groups.js b/src/groups.js index 709aaeda05..f2d9b38e9a 100644 --- a/src/groups.js +++ b/src/groups.js @@ -414,7 +414,7 @@ var async = require('async'), userTitle: data.name, description: data.description || '', deleted: '0', - hidden: '0', + hidden: data.hidden || '0', system: system ? '1' : '0', 'private': data.private || '1' }, @@ -596,14 +596,14 @@ var async = require('async'), } else { Groups.create({ name: groupName, - description: '' + description: '', + hidden: 1 }, function(err) { if (err && err.message !== '[[error:group-already-exists]]') { winston.error('[groups.join] Could not create new hidden group: ' + err.message); return callback(err); } - Groups.hide(groupName); db.setAdd('group:' + groupName + ':members', uid, callback); plugins.fireHook('action:group.join', { groupName: groupName,