Skip to content

Node.js based forum software built for the modern web

fix: add attachments to retrieved post data onNewPost

Julian Lam07bed55e3338
diff --git a/src/topics/create.js b/src/topics/create.js
index 8f347c736a..098fba2d41 100644
--- a/src/topics/create.js
+++ b/src/topics/create.js
@@ -248,7 +248,7 @@ module.exports = function (Topics) {
async function onNewPost({ pid, tid, uid: postOwner }, { uid, handle }) {
const [[postData], [userInfo]] = await Promise.all([
- posts.getPostSummaryByPids([pid], uid, {}),
+ posts.getPostSummaryByPids([pid], uid, { extraFields: ['attachments'] }),
posts.getUserInfoForPosts([postOwner], uid),
]);
await Promise.all([