|
|
|
@ -19,6 +19,7 @@ module.exports = function (Posts) {
|
|
|
|
|
var tid = data.tid;
|
|
|
|
|
var content = data.content.toString();
|
|
|
|
|
var timestamp = data.timestamp || Date.now();
|
|
|
|
|
var isMain = data.isMain || false;
|
|
|
|
|
|
|
|
|
|
if (!uid && parseInt(uid, 10) !== 0) {
|
|
|
|
|
return callback(new Error('[[error:invalid-uid]]'));
|
|
|
|
@ -106,6 +107,7 @@ module.exports = function (Posts) {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
function (postData, next) {
|
|
|
|
|
postData.isMain = isMain;
|
|
|
|
|
plugins.fireHook('action:post.save', _.clone(postData));
|
|
|
|
|
next(null, postData);
|
|
|
|
|
}
|
|
|
|
|