From 2536768133a716c0a5f45ee7ef7e0694b907a205 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Fri, 30 May 2025 12:57:52 -0400 Subject: [PATCH] check for note in initial de-duplication pass --- packages/frontend/src/components/SkUrlPreviewGroup.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/SkUrlPreviewGroup.vue b/packages/frontend/src/components/SkUrlPreviewGroup.vue index 4c43c989bd..beba20f783 100644 --- a/packages/frontend/src/components/SkUrlPreviewGroup.vue +++ b/packages/frontend/src/components/SkUrlPreviewGroup.vue @@ -207,9 +207,13 @@ function deduplicatePreviews(previews: Summary[]): Summary[] { // Skip if we have AP and the other doesn't if (preview.activityPub && !p.activityPub) return false; + // Skip if we have a note and the other doesn't + if (preview.note && !p.note) return false; + // Skip later previews (keep the earliest instance)... - // ...but only if we have AP or the later one doesn't. - if (i > index && (preview.activityPub || !p.activityPub)) return false; + // ...but only if we have AP or the later one doesn't... + // ...and only if we have note or the later one doesn't. + if (i > index && (preview.activityPub || !p.activityPub) && (preview.note || !p.note)) return false; // If we get here, then "preview" is a duplicate of "p" and should be skipped. return true;