fix: #12732 editing of remote post content

title can now be edited, post content is not-editable.
This commit is contained in:
Julian Lam
2024-08-13 15:12:57 -04:00
parent 3474712228
commit 25bf97ae28
2 changed files with 16 additions and 7 deletions

View File

@@ -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,