about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-02-02 08:39:52 -0600
committerDavid Yip <yipdw@member.fsf.org>2018-02-02 08:39:52 -0600
commit4c1fd9a19c779fa6e7d74513c61f37ce05a841b3 (patch)
tree0cf23810e2f7ff0f45c65a3f2f9b35016587c68a /app/services
parentad3a2dfb66abc01a90807f23191b7e28c3c242ed (diff)
parent33f56811e38bc330de9dcfa6794c29a176a30311 (diff)
Merge remote-tracking branch 'tootsuite/master' into merge-upstream
Conflicts:
      app/javascript/styles/mastodon/components.scss
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fetch_link_card_service.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb
index d0472a1d7..3e31a4145 100644
--- a/app/services/fetch_link_card_service.rb
+++ b/app/services/fetch_link_card_service.rb
@@ -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