mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 00:56:13 +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);
|
const mainPidAttachments = await posts.attachments.get(mainPids);
|
||||||
mainPidAttachments.forEach((attachments, idx) => {
|
mainPidAttachments.forEach((attachments, idx) => {
|
||||||
attachments = attachments.filter(
|
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) {
|
if (attachments.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user