From d2aa2a9a29f411ffd7b9d9890e19e8783c405d49 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 23 Aug 2013 15:22:26 -0400 Subject: [PATCH] derpiness --- src/posts.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/posts.js b/src/posts.js index 3115dd8661..6573ee433a 100644 --- a/src/posts.js +++ b/src/posts.js @@ -102,8 +102,7 @@ var RDB = require('./redis.js'), Posts.getPostData = function(pid, callback) { RDB.hgetall('post:' + pid, function(err, data) { if(err === null) { - plugins.fireHook('filter:post.get', data.content, function(content) { - data.content = content; + plugins.fireHook('filter:post.get', data, function(data) { callback(data); }); } @@ -324,8 +323,8 @@ var RDB = require('./redis.js'), }); }, content: function(next) { - plugins.fireHook('filter:post.get', content, function(content) { - next(null, content); + plugins.fireHook('filter:post.get', postData, function(postData) { + next(null, postData.content); }); } }, function(err, results) { @@ -335,7 +334,7 @@ var RDB = require('./redis.js'), callback(postData); }); - plugins.fireHook('action:post.save', [pid, content]); + plugins.fireHook('action:post.save', [postData]); postSearch.index(content, pid); });