From dd38ee96faed8dc68786fd67743bb33a5d69d823 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 21 Jan 2015 13:46:40 -0500 Subject: [PATCH] return cover:url in user groups --- src/groups.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/groups.js b/src/groups.js index 939d8fa5c6..07266af711 100644 --- a/src/groups.js +++ b/src/groups.js @@ -775,7 +775,7 @@ var async = require('async'), return 'group:' + groupName; }); - db.getObjectsFields(groupKeys, ['name', 'slug', 'hidden', 'userTitle', 'icon', 'labelColor'], function(err, groupData) { + db.getObjects(groupKeys, function(err, groupData) { if (err) { return callback(err); } @@ -786,6 +786,12 @@ var async = require('async'), var groupSets = groupData.map(function(group) { group.labelColor = group.labelColor || '#000000'; + + if (!group['cover:url']) { + group['cover:url'] = nconf.get('relative_path') + '/images/cover-default.png'; + group['cover:position'] = '50% 50%'; + } + return 'group:' + group.name + ':members'; });