added new hook "filter:digest.subscribers" to allow plugins to override digest subscriptions

v1.18.x
Julian Lam 10 years ago
parent 766e233b87
commit 791e0893ab

@ -64,7 +64,14 @@ var async = require('async'),
};
Digest.getSubscribers = function(interval, callback) {
db.getSortedSetRange('digest:' + interval + ':uids', 0, -1, callback);
db.getSortedSetRange('digest:' + interval + ':uids', 0, -1, function(err, subscribers) {
plugins.fireHook('filter:digest.subscribers', {
interval: interval,
subscribers: subscribers
}, function(err, returnData) {
callback(err, returnData.subscribers);
});
});
};
Digest.send = function(data, callback) {

Loading…
Cancel
Save