logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 1b82fd95d414a411f4aaae125c66c8df53f84f21
parent 88ce0e8b24582020276dfc292abbf000211f9479
Author: Mark Felder <feld@feld.me>
Date:   Fri, 30 Dec 2022 15:36:21 -0500

Remove unwanted code specific to MIX_ENV=test

Diffstat:

Mlib/pleroma/web/rel_me.ex18+++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/lib/pleroma/web/rel_me.ex b/lib/pleroma/web/rel_me.ex @@ -9,17 +9,13 @@ defmodule Pleroma.Web.RelMe do recv_timeout: 2_000 ] - if Pleroma.Config.get(:env) == :test do - def parse(url) when is_binary(url), do: parse_url(url) - else - @cachex Pleroma.Config.get([:cachex, :provider], Cachex) - def parse(url) when is_binary(url) do - @cachex.fetch!(:rel_me_cache, url, fn _ -> - {:commit, parse_url(url)} - end) - rescue - e -> {:error, "Cachex error: #{inspect(e)}"} - end + @cachex Pleroma.Config.get([:cachex, :provider], Cachex) + def parse(url) when is_binary(url) do + @cachex.fetch!(:rel_me_cache, url, fn _ -> + {:commit, parse_url(url)} + end) + rescue + e -> {:error, "Cachex error: #{inspect(e)}"} end def parse(_), do: {:error, "No URL provided"}