Skip to content

Node.js based forum software built for the modern web

fix: use more recent deleted data on edit post

Barış Soner Uşaklıe6be0bfb5339
diff --git a/src/api/posts.js b/src/api/posts.js
index a93a5e78fe..c081811ec0 100644
--- a/src/api/posts.js
+++ b/src/api/posts.js
@@ -147,7 +147,7 @@ postsAPI.edit = async function (caller, data) {
const returnData = { ...postObj[0], ...editResult.post };
returnData.topic = { ...postObj[0].topic, ...editResult.post.topic };
- if (!editResult.post.deleted) {
+ if (!postObj.deleted) {
const topicScheduled = await topics.getTopicField(editResult.topic.tid, 'scheduled');
websockets.in(`topic_${editResult.topic.tid}`).emit('event:post_edited', editResult);
if (!topicScheduled) {