mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: map to actual mainPid value
This commit is contained in:
@@ -54,7 +54,8 @@ Thumbs.get = async function (tids) {
|
|||||||
const thumbs = await Promise.all(sets.map(getThumbs));
|
const thumbs = await Promise.all(sets.map(getThumbs));
|
||||||
|
|
||||||
// Add attachments to thumb sets
|
// Add attachments to thumb sets
|
||||||
const mainPids = await topics.getTopicsFields(tids, ['mainPid']);
|
let mainPids = await topics.getTopicsFields(tids, ['mainPid']);
|
||||||
|
mainPids = mainPids.map(o => o.mainPid);
|
||||||
const mainPidAttachments = await posts.attachments.get(mainPids);
|
const mainPidAttachments = await posts.attachments.get(mainPids);
|
||||||
mainPidAttachments.forEach((attachments, idx) => {
|
mainPidAttachments.forEach((attachments, idx) => {
|
||||||
attachments = attachments.filter(
|
attachments = attachments.filter(
|
||||||
|
|||||||
Reference in New Issue
Block a user