fix: fix double thumb due to post attachments

This commit is contained in:
Julian Lam
2024-12-12 15:03:16 -05:00
parent b15a684a92
commit 755b985596

View File

@@ -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) {