This commit is contained in:
parent
025282ff39
commit
7e147cb2a8
1 changed files with 17 additions and 6 deletions
|
|
@ -90,6 +90,7 @@ type Embed struct {
|
|||
Video *Video `json:"video,omitempty"`
|
||||
Record *PostRecord `json:"record,omitempty"`
|
||||
External *External `json:"external,omitempty"`
|
||||
GalleryItems []Images `json:"items,omitempty"`
|
||||
}
|
||||
|
||||
type Values struct {
|
||||
|
|
@ -425,6 +426,16 @@ func (p *Post) GetEmbeds() []ParsedEmbeds {
|
|||
})
|
||||
}
|
||||
|
||||
case "app.bsky.embed.gallery":
|
||||
for _, item := range p.Embed.GalleryItems {
|
||||
if item.Image != nil && item.Image.Ref != nil {
|
||||
parsedEmbeds = append(parsedEmbeds, ParsedEmbeds{
|
||||
URI: item.Image.Ref.Link,
|
||||
Type: "image",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
case "app.bsky.embed.recordWithMedia":
|
||||
// Quote post - also extract the media it contains
|
||||
if p.Embed.Record != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue