updating notifications.create to accept a hash instead of discrete arguments - breaking change

This commit is contained in:
Julian Lam
2014-02-15 14:52:59 -05:00
parent 17ae56e555
commit aba1b95cac
5 changed files with 44 additions and 29 deletions

View File

@@ -268,7 +268,11 @@ var winston = require('winston'),
return next(err);
}
notifications.create('<strong>' + username + '</strong> has posted a reply to: "<strong>' + topicData.title + '</strong>"', nconf.get('relative_path') + '/topic/' + topicData.slug + '#' + pid, 'topic:' + tid, function(nid) {
notifications.create({
text: '<strong>' + username + '</strong> has posted a reply to: "<strong>' + topicData.title + '</strong>"',
path: nconf.get('relative_path') + '/topic/' + topicData.slug + '#' + pid,
uniqueId: 'topic:' + tid
}, function(nid) {
next(null, nid);
});
});
@@ -289,7 +293,7 @@ var winston = require('winston'),
});
}
], function(err, results) {
if (!err) {
if (!err && results[1].length) {
notifications.push(results[0], results[1]);
}
});