From: Mark Felder Date: Fri, 8 Jan 2021 22:43:19 +0000 (-0600) Subject: Avoid duplicate Config calls X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=530fb5b29ebd414781c703e4b41d204135f3efe7;p=akkoma Avoid duplicate Config calls --- diff --git a/lib/pleroma/upload.ex b/lib/pleroma/upload.ex index 101cfec98..3061b2aed 100644 --- a/lib/pleroma/upload.ex +++ b/lib/pleroma/upload.ex @@ -233,6 +233,7 @@ defmodule Pleroma.Upload do def base_url do uploader = Config.get([Pleroma.Upload, :uploader]) upload_base_url = Config.get([Pleroma.Upload, :base_url]) + public_endpoint = Config.get([uploader, :public_endpoint]) case uploader do Pleroma.Uploaders.Local -> @@ -246,8 +247,8 @@ defmodule Pleroma.Upload do _ -> cond do - !is_nil(Config.get([uploader, :public_endpoint])) -> - Config.get([uploader, :public_endpoint]) + !is_nil(public_endpoint) -> + public_endpoint true -> upload_base_url