rich media: use optimized Object.normalize()
This commit is contained in:
parent
e75e43b949
commit
b3bf523c09
|
@ -23,7 +23,7 @@ defp validate_page_url(_), do: :error
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue