Browse Source

Store preview image for embedded photo in preview cards (#5986)

The preview image would be useful to embed in timeline.
pull/4/head
Akihiko Odaki 6 years ago
committed by Eugen Rochko
parent
commit
f9f6918148
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/services/fetch_link_card_service.rb

+ 1
- 0
app/services/fetch_link_card_service.rb View File

@ -89,6 +89,7 @@ class FetchLinkCardService < BaseService
when 'photo'
return false unless response.respond_to?(:url)
@card.embed_url = response.url
@card.image = URI.parse(response.url)
@card.width = response.width.presence || 0
@card.height = response.height.presence || 0
when 'video'

Loading…
Cancel
Save