RichMedia.Helpers: fix compile cycle on Application
This commit is contained in:
parent
bef32d6e02
commit
caefb0378a
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue