This commit is contained in:
barisusakli
2014-07-28 15:52:33 -04:00
parent 4d73a563c5
commit d7520508e3
12 changed files with 335 additions and 252 deletions

View File

@@ -124,8 +124,10 @@ function sendNotificationToPostOwner(data, uid, notification) {
path: nconf.get('relative_path') + '/topic/' + results.slug + '/' + results.index,
uniqueId: 'post:' + data.pid,
from: uid
}, function(nid) {
notifications.push(nid, [postData.uid]);
}, function(err, nid) {
if (!err) {
notifications.push(nid, [postData.uid]);
}
});
});
});
@@ -327,10 +329,11 @@ SocketPosts.flag = function(socket, pid, callback) {
path: path,
uniqueId: 'post_flag:' + pid,
from: socket.uid
}, function(nid) {
notifications.push(nid, adminGroup.members, function() {
next();
});
}, function(err, nid) {
if (err) {
return next(err);
}
notifications.push(nid, adminGroup.members, next);
});
},
function(next) {