mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Fix saving of oEmbed image (#6409)
This commit is contained in:
parent
c1efe0aa1d
commit
7e5c433dfc
1 changed files with 5 additions and 5 deletions
|
@ -91,13 +91,13 @@ class FetchLinkCardService < BaseService
|
|||
|
||||
case @card.type
|
||||
when 'link'
|
||||
@card.image = URI.parse(embed.thumbnail_url) if embed.respond_to?(:thumbnail_url)
|
||||
@card.image_remote_url = embed.thumbnail_url if embed.respond_to?(:thumbnail_url)
|
||||
when 'photo'
|
||||
return false unless embed.respond_to?(:url)
|
||||
@card.embed_url = embed.url
|
||||
@card.image = URI.parse(embed.url)
|
||||
@card.width = embed.width.presence || 0
|
||||
@card.height = embed.height.presence || 0
|
||||
@card.embed_url = embed.url
|
||||
@card.image_remote_url = embed.url
|
||||
@card.width = embed.width.presence || 0
|
||||
@card.height = embed.height.presence || 0
|
||||
when 'video'
|
||||
@card.width = embed.width.presence || 0
|
||||
@card.height = embed.height.presence || 0
|
||||
|
|
Loading…
Reference in a new issue