Skip to content

Commit

Permalink
Parse sig
Browse files Browse the repository at this point in the history
  • Loading branch information
yariplus committed Mar 19, 2016
1 parent ad6851a commit a1b0374
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions library.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ plugin.parsePost = function(data, callback) {
});
};

plugin.parseSignature = function(data, callback) {
plugin.parseRaw(data.userData.signature, function(err, content){
data.userData.signature = content;
callback(null, data);
});
};

plugin.reload = function (data, next) {
killWorker();
next();
Expand Down
10 changes: 9 additions & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@
"priority": 100
}, {
"hook": "filter:post.parse",
"method": "parse",
"method": "parsePost",
"priority": 100
}, {
"hook": "filter:parse.signature",
"method": "parseSignature",
"priority": 100
}, {
"hook": "filter:signature.parse",
"method": "parseSignature",
"priority": 100
}],
"templates": "./public/templates"
Expand Down

0 comments on commit a1b0374

Please sign in to comment.