Skip to content

Node.js based forum software built for the modern web

fix: topic object in post editing data return

Julian Lam3c98cd3d95ee
diff --git a/src/api/posts.js b/src/api/posts.js
index c02e29c2a0..e21bbb426b 100644
--- a/src/api/posts.js
+++ b/src/api/posts.js
@@ -48,6 +48,7 @@ postsAPI.edit = async function (caller, data) {
}
const postObj = await posts.getPostSummaryByPids([editResult.post.pid], caller.uid, {});
const returnData = { ...postObj[0], ...editResult.post };
+ returnData.topic = { ...postObj[0].topic, ...editResult.post.topic };
if (!editResult.post.deleted) {
websockets.in('topic_' + editResult.topic.tid).emit('event:post_edited', editResult);