From caefb0378a383f21bc19260696f8b2772ef7a166 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 8 Aug 2021 11:57:40 -0500 Subject: [PATCH] RichMedia.Helpers: fix compile cycle on Application --- lib/pleroma/web/rich_media/helpers.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pleroma/web/rich_media/helpers.ex b/lib/pleroma/web/rich_media/helpers.ex index 7021c70ffb..3d64d96e65 100644 --- a/lib/pleroma/web/rich_media/helpers.ex +++ b/lib/pleroma/web/rich_media/helpers.ex @@ -16,7 +16,7 @@ defmodule Pleroma.Web.RichMedia.Helpers do recv_timeout: 2_000 ] - @headers [{"user-agent", Pleroma.Application.user_agent() <> "; Bot"}] + defp headers, do: [{"user-agent", Pleroma.Application.user_agent() <> "; Bot"}] @spec validate_page_url(URI.t() | binary()) :: :ok | :error defp validate_page_url(page_url) when is_binary(page_url) do @@ -82,11 +82,11 @@ def fetch_data_for_activity(%Activity{data: %{"type" => "Create"}} = activity) d def fetch_data_for_activity(_), do: %{} def oembed_get(url) do - Pleroma.HTTP.get(url, @headers, @options) + Pleroma.HTTP.get(url, headers(), @options) end def rich_media_get(url) do - headers = @headers + headers = headers() head_check = case Pleroma.HTTP.head(url, headers, @options) do