diff --git a/src/groups.js b/src/groups.js index ab0be677a9..194534839d 100644 --- a/src/groups.js +++ b/src/groups.js @@ -403,10 +403,9 @@ var async = require('async'), group.hidden = parseInt(group.hidden, 10) === 1; group.system = parseInt(group.system, 10) === 1; group.private = parseInt(group.private, 10) === 1; - if (!group['cover:url']) { - group['cover:url'] = nconf.get('relative_path') + '/images/cover-default.png'; - group['cover:position'] = '50% 50%'; - } + + group['cover:url'] = group['cover:url'] || require('./coverPhoto').getDefaultGroupCover(group.name); + group['cover:position'] = group['cover:position'] || '50% 50%'; } });