Skip to content

Node.js based forum software built for the modern web

Only send isMain to hook instead of saving to post hash

pichalite9176f7e0376a
diff --git a/src/posts/create.js b/src/posts/create.js
index c6b232cf28..3484bc424e 100644
--- a/src/posts/create.js
+++ b/src/posts/create.js
@@ -43,8 +43,7 @@ module.exports = function (Posts) {
'tid': tid,
'content': content,
'timestamp': timestamp,
- 'deleted': 0,
- 'isMain': isMain
+ 'deleted': 0
};
if (data.toPid) {
@@ -108,6 +107,7 @@ module.exports = function (Posts) {
});
},
function (postData, next) {
+ postData.isMain = isMain;
plugins.fireHook('action:post.save', _.clone(postData));
next(null, postData);
}