mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: fix double thumb due to post attachments
This commit is contained in:
@@ -60,7 +60,7 @@ Thumbs.get = async function (tids) {
|
||||
const mainPidAttachments = await posts.attachments.get(mainPids);
|
||||
mainPidAttachments.forEach((attachments, idx) => {
|
||||
attachments = attachments.filter(
|
||||
attachment => attachment.mediaType && attachment.mediaType.startsWith('image/')
|
||||
attachment => !thumbs[idx].includes(attachment.url) && (attachment.mediaType && attachment.mediaType.startsWith('image/'))
|
||||
);
|
||||
|
||||
if (attachments.length) {
|
||||
|
||||
Reference in New Issue
Block a user