mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
we just need the group members :trollface:
This commit is contained in:
@@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user