part 1 of notif refactor

This commit is contained in:
barisusakli
2014-09-08 23:03:37 -04:00
parent 01f983e29c
commit 493d0dea1e
17 changed files with 323 additions and 285 deletions

View File

@@ -353,11 +353,11 @@ SocketTopics.sendNotificationToTopicOwner = function(tid, fromuid, notification)
notifications.create({
bodyShort: '[[' + notification + ', ' + results.username + ']]',
path: nconf.get('relative_path') + '/topic/' + results.topicData.slug,
uniqueId: 'topic:' + tid + ':uid:' + fromuid,
nid: 'topic:' + tid + ':uid:' + fromuid,
from: fromuid
}, function(err, nid) {
if (!err) {
notifications.push(nid, [results.topicData.uid]);
}, function(err, notification) {
if (!err && notification) {
notifications.push(notification, [results.topicData.uid]);
}
});
});