mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 20:41:17 +01:00
fix: #12732 editing of remote post content
title can now be edited, post content is not-editable.
This commit is contained in:
@@ -34,6 +34,7 @@ module.exports = function (Posts) {
|
||||
|
||||
await scheduledTopicCheck(data, topicData);
|
||||
|
||||
data.content = data.content === null ? postData.content : data.content;
|
||||
const oldContent = postData.content; // for diffing purposes
|
||||
const editPostData = getEditPostData(data, topicData, postData);
|
||||
|
||||
@@ -106,7 +107,7 @@ module.exports = function (Posts) {
|
||||
const { tid } = postData;
|
||||
const title = data.title ? data.title.trim() : '';
|
||||
|
||||
const isMain = parseInt(data.pid, 10) === parseInt(topicData.mainPid, 10);
|
||||
const isMain = String(data.pid) === String(topicData.mainPid);
|
||||
if (!isMain) {
|
||||
return {
|
||||
tid: tid,
|
||||
|
||||
Reference in New Issue
Block a user