From: Jeff Becker Date: Mon, 29 Jan 2018 15:06:16 +0000 (-0500) Subject: use nil instead of empty string X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=066fe1a697286e38c9e9ef7f2c273c4e7a50ffdc;p=akkoma use nil instead of empty string --- diff --git a/config/config.exs b/config/config.exs index 05995085c..e71d5e5a0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -42,7 +42,7 @@ version = with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do # Configures http settings, upstream proxy etc. config :pleroma, :http, - proxy_url: "" + proxy_url: nil config :pleroma, :instance, version: version, diff --git a/lib/pleroma/http/http.ex b/lib/pleroma/http/http.ex index 31135411c..8b8a82353 100644 --- a/lib/pleroma/http/http.ex +++ b/lib/pleroma/http/http.ex @@ -4,9 +4,9 @@ defmodule Pleroma.HTTP do def process_request_options(options) do config = Application.get_env(:pleroma, :http, []) - proxy = Keyword.get(config, :proxy_url, "") + proxy = Keyword.get(config, :proxy_url, nil) case proxy do - "" -> options + nil -> options _ -> options ++ [proxy: proxy] end end