mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +01:00
added post.buildFooter and post.parseSignature hooks
This commit is contained in:
@@ -225,10 +225,26 @@ var RDB = require('./redis'),
|
||||
PostTools.parse = function(raw, callback) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
PostTools.parseSignature = function(raw, callback) {
|
||||
raw = raw || '';
|
||||
|
||||
plugins.fireHook('filter:post.parseSignature', raw, function(err, parsedSignature) {
|
||||
callback(null, !err ? parsedSignature : raw);
|
||||
});
|
||||
}
|
||||
}(exports));
|
||||
Reference in New Issue
Block a user