we just need the group members :trollface:

v1.18.x
barisusakli 10 years ago
parent 5d7b46935d
commit 25a2e9b812

@ -207,12 +207,12 @@ var async = require('async'),
Notifications.pushGroup = function(notification, groupName, callback) {
callback = callback || function() {};
groups.get(groupName, {}, function(err, groupObj) {
if (err || !groupObj || !Array.isArray(groupObj.members) || !groupObj.members.length) {
groups.getMembers(groupName, 0, -1, function(err, members) {
if (err || !Array.isArray(members) || !members.length) {
return callback(err);
}
Notifications.push(notification, groupObj.members, callback);
Notifications.push(notification, members, callback);
});
};

Loading…
Cancel
Save