mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
fix: add attachments to retrieved post data onNewPost
This commit is contained in:
@@ -248,7 +248,7 @@ module.exports = function (Topics) {
|
|||||||
|
|
||||||
async function onNewPost({ pid, tid, uid: postOwner }, { uid, handle }) {
|
async function onNewPost({ pid, tid, uid: postOwner }, { uid, handle }) {
|
||||||
const [[postData], [userInfo]] = await Promise.all([
|
const [[postData], [userInfo]] = await Promise.all([
|
||||||
posts.getPostSummaryByPids([pid], uid, {}),
|
posts.getPostSummaryByPids([pid], uid, { extraFields: ['attachments'] }),
|
||||||
posts.getUserInfoForPosts([postOwner], uid),
|
posts.getUserInfoForPosts([postOwner], uid),
|
||||||
]);
|
]);
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
|||||||
Reference in New Issue
Block a user