added post.buildFooter and post.parseSignature hooks

v1.18.x
Julian Lam 11 years ago
parent cc242ca667
commit 77d5ecc82a

@ -225,10 +225,26 @@ var RDB = require('./redis'),
PostTools.parse = function(raw, callback) { PostTools.parse = function(raw, callback) {
raw = raw || ''; raw = raw || '';
plugins.fireHook('filter:post.parse', raw, function(err, parsed) { async.waterfall([
function(next) {
console.log('parsing');
plugins.fireHook('filter:post.parse', raw, next);
},
function(parsed, next) {
console.log('footering');
plugins.fireHook('filter:post.buildFooter', parsed, next);
}
], function(err, parsed) {
console.log('doneing');
callback(null, !err ? parsed : raw); callback(null, !err ? parsed : raw);
}); });
} }
PostTools.parseSignature = function(raw, callback) {
raw = raw || '';
plugins.fireHook('filter:post.parseSignature', raw, function(err, parsedSignature) {
callback(null, !err ? parsedSignature : raw);
});
}
}(exports)); }(exports));
Loading…
Cancel
Save