mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-13 02:47:41 +02:00
feat: allow post diffs to be restored, #8406
This commit is contained in:
@@ -46,7 +46,12 @@ module.exports = function (Posts) {
|
||||
await Posts.setPostFields(data.pid, postData);
|
||||
|
||||
if (meta.config.enablePostHistory === 1) {
|
||||
await Posts.diffs.save(data.pid, oldContent, data.content);
|
||||
await Posts.diffs.save({
|
||||
pid: data.pid,
|
||||
uid: data.uid,
|
||||
oldContent: oldContent,
|
||||
newContent: data.content,
|
||||
});
|
||||
}
|
||||
await Posts.uploads.sync(data.pid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user