logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: f9f6918148ab2471292bcc89e14be8471b42c992
parent: 2a61b9f000039a7d02315cdf6bca58138861a71c
Author: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Date:   Tue, 12 Dec 2017 23:54:38 +0900

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

The preview image would be useful to embed in timeline.

Diffstat:

Mapp/services/fetch_link_card_service.rb1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb @@ -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'