Skip to content

Commit bcd38ad

Browse files
committed
fix: images with quotes
1 parent 29a13ab commit bcd38ad

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

bluesky/blueskyapi.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,14 @@ type Embed struct {
9191
Type string `json:"$type"`
9292
Images []Image `json:"images,omitempty"`
9393
External ExternalImage `json:"external,omitempty"`
94+
Media MoreImages `json:"media"`
9495
Video `json:",omitempty"`
9596
}
9697

98+
type MoreImages struct {
99+
Images []Image `json:"images,omitempty"`
100+
}
101+
97102
// doesn't contain everything, but who cares
98103
type ExternalImage struct {
99104
Uri string `json:"uri"`

twitterv1/post_viewing.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,10 @@ func TranslatePostToTweet(tweet blueskyapi.Post, replyMsgBskyURI string, replyUs
361361

362362
id := 1
363363

364+
// Quote replies are different for some reason, app.bsky.embed.recordWithMedia
365+
364366
// Images
365-
for _, image := range tweet.Record.Embed.Images {
367+
for _, image := range append(tweet.Record.Embed.Images, tweet.Record.Embed.Media.Images...) {
366368
// Add the image "url" to the text
367369
startLen, endLen := 0, 0
368370
formattedImageURL := configData.ImgURLText

0 commit comments

Comments
 (0)