Fix compile
authorMark Felder <feld@FreeBSD.org>
Tue, 12 Feb 2019 00:25:12 +0000 (00:25 +0000)
committerMark Felder <feld@FreeBSD.org>
Tue, 12 Feb 2019 00:25:12 +0000 (00:25 +0000)
lib/pleroma/web/metadata/twitter_card.ex

index 0365e464752978f60180420cde00db6c4c9a19ce..13fa22240649832e4baa015a0e3dba79f8257733 100644 (file)
@@ -69,8 +69,6 @@ defmodule Pleroma.Web.Metadata.Providers.TwitterCard do
     Enum.reduce(attachments, [], fn attachment, acc ->
       rendered_tags =
         Enum.reduce(attachment["url"], [], fn url, acc ->
-          content_type = url["mediaType"]
-
           media_type =
             Enum.find(["image", "audio", "video"], fn media_type ->
               String.starts_with?(url["mediaType"], media_type)
@@ -92,10 +90,7 @@ defmodule Pleroma.Web.Metadata.Providers.TwitterCard do
                 {:meta,
                  [
                    property: "twitter:player",
-                   content:
-                     Utils.attachment_url(
-                       Pleroma.Uploaders.Uploader.preview_url(content_type, url["href"])
-                     )
+                   content: Utils.attachment_url(url["href"])
                  ], []}
                 | acc
               ]