Add gallery embed type support (display + compose) (#10707)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {
|
||||
type $Typed,
|
||||
AppBskyEmbedExternal,
|
||||
AppBskyEmbedGallery,
|
||||
AppBskyEmbedImages,
|
||||
AppBskyEmbedRecord,
|
||||
AppBskyEmbedRecordWithMedia,
|
||||
@@ -47,6 +48,10 @@ export type Embed =
|
||||
type: 'images'
|
||||
view: $Typed<AppBskyEmbedImages.View>
|
||||
}
|
||||
| {
|
||||
type: 'gallery'
|
||||
view: $Typed<AppBskyEmbedGallery.View>
|
||||
}
|
||||
| {
|
||||
type: 'link'
|
||||
view: $Typed<AppBskyEmbedExternal.View>
|
||||
@@ -122,6 +127,11 @@ export function parseEmbed(embed: AppBskyFeedDefs.PostView['embed']): Embed {
|
||||
type: 'images',
|
||||
view: embed,
|
||||
}
|
||||
} else if (AppBskyEmbedGallery.isView(embed)) {
|
||||
return {
|
||||
type: 'gallery',
|
||||
view: embed,
|
||||
}
|
||||
} else if (AppBskyEmbedExternal.isView(embed)) {
|
||||
return {
|
||||
type: 'link',
|
||||
|
||||
Reference in New Issue
Block a user