Fix saving of oEmbed image (#6409)
parent
1cd049c57b
commit
b209de40f4
|
@ -91,11 +91,11 @@ 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.image_remote_url = embed.url
|
||||
@card.width = embed.width.presence || 0
|
||||
@card.height = embed.height.presence || 0
|
||||
when 'video'
|
||||
|
|
Loading…
Reference in New Issue