fix: post editing not taking plugin hook results into account

This commit is contained in:
Julian Lam
2020-10-30 10:05:26 -04:00
parent 2738041b38
commit 4439864ce0

View File

@@ -67,7 +67,7 @@ module.exports = function (Posts) {
// Normalize data prior to constructing returnPostData (match types with getPostSummaryByPids)
postData.deleted = !!postData.deleted;
const returnPostData = { ...postData, ...editPostData };
const returnPostData = { ...postData, ...result.post };
returnPostData.cid = topic.cid;
returnPostData.topic = topic;
returnPostData.editedISO = utils.toISOString(now);