embedr: return null width (#3598)

zio/stable
bnewbold 2024-04-17 14:41:29 -07:00 committed by GitHub
parent 56828c088d
commit 7e16276c04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -55,8 +55,8 @@ type OEmbedResponse struct {
AuthorURL string `json:"author_url,omitempty"` AuthorURL string `json:"author_url,omitempty"`
ProviderName string `json:"provider_url,omitempty"` ProviderName string `json:"provider_url,omitempty"`
CacheAge int `json:"cache_age,omitempty"` CacheAge int `json:"cache_age,omitempty"`
Width int `json:"width,omitempty"` Width *int `json:"width"`
Height *int `json:"height,omitempty"` Height *int `json:"height"`
HTML string `json:"html,omitempty"` HTML string `json:"html,omitempty"`
} }
@ -165,7 +165,7 @@ func (srv *Server) WebOEmbed(c echo.Context) error {
AuthorURL: fmt.Sprintf("https://bsky.app/profile/%s", post.Author.Handle), AuthorURL: fmt.Sprintf("https://bsky.app/profile/%s", post.Author.Handle),
ProviderName: "Bluesky Social", ProviderName: "Bluesky Social",
CacheAge: 86400, CacheAge: 86400,
Width: width, Width: &width,
Height: nil, Height: nil,
HTML: html, HTML: html,
} }