Fix missing RecordWithMedia media embed preview in notifications view (#7988)

This commit is contained in:
Eric Bailey
2025-03-14 10:28:02 -05:00
committed by GitHub
parent dcc8b35146
commit 9cea7f0393
2 changed files with 20 additions and 11 deletions
+8
View File
@@ -54,6 +54,14 @@ export function Embed({
<VideoItem thumbnail={e.view.thumbnail} alt={e.view.alt} />
</Outer>
)
} else if (
e.type === 'post_with_media' &&
// ignore further "nested" RecordWithMedia
e.media.type !== 'post_with_media' &&
// ignore any unknowns
e.media.view !== null
) {
return <Embed embed={e.media.view} style={style} />
}
return null