mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-27 02:40:39 +01:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user