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

@@ -224,11 +224,11 @@ function sendChatNotification(fromuid, touid, messageObj) {
bodyShort: '[[notifications:new_message_from, ' + messageObj.fromUser.username + ']]',
bodyLong: messageObj.content,
path: nconf.get('relative_path') + '/chats/' + utils.slugify(messageObj.fromUser.username),
uniqueId: 'chat_' + fromuid + '_' + touid,
nid: 'chat_' + fromuid + '_' + touid,
from: fromuid
}, function(err, nid) {
if (!err) {
notifications.push(nid, [touid]);
}, function(err, notification) {
if (!err && notification) {
notifications.push(notification, [touid]);
}
});
}