mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: topic object in post editing data return
This commit is contained in:
@@ -48,6 +48,7 @@ postsAPI.edit = async function (caller, data) {
|
|||||||
}
|
}
|
||||||
const postObj = await posts.getPostSummaryByPids([editResult.post.pid], caller.uid, {});
|
const postObj = await posts.getPostSummaryByPids([editResult.post.pid], caller.uid, {});
|
||||||
const returnData = { ...postObj[0], ...editResult.post };
|
const returnData = { ...postObj[0], ...editResult.post };
|
||||||
|
returnData.topic = { ...postObj[0].topic, ...editResult.post.topic };
|
||||||
|
|
||||||
if (!editResult.post.deleted) {
|
if (!editResult.post.deleted) {
|
||||||
websockets.in('topic_' + editResult.topic.tid).emit('event:post_edited', editResult);
|
websockets.in('topic_' + editResult.topic.tid).emit('event:post_edited', editResult);
|
||||||
|
|||||||
Reference in New Issue
Block a user