Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Eric Bailey and committed by
GitHub
9cea7f03 dcc8b351

+20 -11
+8
src/components/MediaPreview.tsx
··· 54 54 <VideoItem thumbnail={e.view.thumbnail} alt={e.view.alt} /> 55 55 </Outer> 56 56 ) 57 + } else if ( 58 + e.type === 'post_with_media' && 59 + // ignore further "nested" RecordWithMedia 60 + e.media.type !== 'post_with_media' && 61 + // ignore any unknowns 62 + e.media.view !== null 63 + ) { 64 + return <Embed embed={e.media.view} style={style} /> 57 65 } 58 66 59 67 return null
+12 -11
src/types/bsky/post.ts
··· 1 1 import { 2 + $Typed, 2 3 AppBskyEmbedExternal, 3 4 AppBskyEmbedImages, 4 5 AppBskyEmbedRecord, ··· 12 13 export type Embed = 13 14 | { 14 15 type: 'post' 15 - view: AppBskyEmbedRecord.ViewRecord 16 + view: $Typed<AppBskyEmbedRecord.ViewRecord> 16 17 } 17 18 | { 18 19 type: 'post_not_found' 19 - view: AppBskyEmbedRecord.ViewNotFound 20 + view: $Typed<AppBskyEmbedRecord.ViewNotFound> 20 21 } 21 22 | { 22 23 type: 'post_blocked' 23 - view: AppBskyEmbedRecord.ViewBlocked 24 + view: $Typed<AppBskyEmbedRecord.ViewBlocked> 24 25 } 25 26 | { 26 27 type: 'post_detached' 27 - view: AppBskyEmbedRecord.ViewDetached 28 + view: $Typed<AppBskyEmbedRecord.ViewDetached> 28 29 } 29 30 | { 30 31 type: 'feed' 31 - view: AppBskyFeedDefs.GeneratorView 32 + view: $Typed<AppBskyFeedDefs.GeneratorView> 32 33 } 33 34 | { 34 35 type: 'list' 35 - view: AppBskyGraphDefs.ListView 36 + view: $Typed<AppBskyGraphDefs.ListView> 36 37 } 37 38 | { 38 39 type: 'labeler' 39 - view: AppBskyLabelerDefs.LabelerView 40 + view: $Typed<AppBskyLabelerDefs.LabelerView> 40 41 } 41 42 | { 42 43 type: 'starter_pack' 43 - view: AppBskyGraphDefs.StarterPackViewBasic 44 + view: $Typed<AppBskyGraphDefs.StarterPackViewBasic> 44 45 } 45 46 | { 46 47 type: 'images' 47 - view: AppBskyEmbedImages.View 48 + view: $Typed<AppBskyEmbedImages.View> 48 49 } 49 50 | { 50 51 type: 'link' 51 - view: AppBskyEmbedExternal.View 52 + view: $Typed<AppBskyEmbedExternal.View> 52 53 } 53 54 | { 54 55 type: 'video' 55 - view: AppBskyEmbedVideo.View 56 + view: $Typed<AppBskyEmbedVideo.View> 56 57 } 57 58 | { 58 59 type: 'post_with_media'