diff --git a/src/groups.js b/src/groups.js index ec21035228..3d0bbe6d6c 100644 --- a/src/groups.js +++ b/src/groups.js @@ -444,7 +444,7 @@ var async = require('async'), return callback(err || new Error('[[error:no-group]]')); } - var values = { + var payload = { userTitle: values.userTitle || '', description: values.description || '', icon: values.icon || '', @@ -453,16 +453,16 @@ var async = require('async'), 'private': values.private === false ? '0' : '1' }; - db.setObject('group:' + groupName, values, function(err) { + db.setObject('group:' + groupName, payload, function(err) { if (err) { return callback(err); } plugins.fireHook('action:group.updated', { name: groupName, - values: values + values: payload }); - renameGroup(groupName, values.name, callback); + renameGroup(groupName, payload.name, callback); }); }); };