mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 23:15:48 +01:00
updating notifications.create to accept a hash instead of discrete arguments - breaking change
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user