From: William Pitcock Date: Sat, 23 Mar 2019 00:22:57 +0000 (+0000) Subject: rich media: use optimized Object.normalize() X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=b3bf523c0967e27616b78a42ba50a6b4c432749e;p=akkoma rich media: use optimized Object.normalize() --- diff --git a/lib/pleroma/web/rich_media/helpers.ex b/lib/pleroma/web/rich_media/helpers.ex index 92c61ff51..f97d1863c 100644 --- a/lib/pleroma/web/rich_media/helpers.ex +++ b/lib/pleroma/web/rich_media/helpers.ex @@ -23,7 +23,7 @@ defmodule Pleroma.Web.RichMedia.Helpers do def fetch_data_for_activity(%Activity{} = activity) do with true <- Pleroma.Config.get([:rich_media, :enabled]), - %Object{} = object <- Object.normalize(activity.data["object"]), + %Object{} = object <- Object.normalize(activity), {:ok, page_url} <- HTML.extract_first_external_url(object, object.data["content"]), :ok <- validate_page_url(page_url), {:ok, rich_media} <- Parser.parse(page_url) do