Merge branch 'fix/1991-tzdata-update' into 'develop'
user agent if Endpoint is not started yet Closes #1991 See merge request pleroma/pleroma!2945
This commit is contained in:
commit
0ab03e8564
|
@ -22,6 +22,7 @@ def named_version, do: @name <> " " <> @version
|
|||
def repository, do: @repository
|
||||
|
||||
def user_agent do
|
||||
if Process.whereis(Pleroma.Web.Endpoint) do
|
||||
case Config.get([:http, :user_agent], :default) do
|
||||
:default ->
|
||||
info = "#{Pleroma.Web.base_url()} <#{Config.get([:instance, :email], "")}>"
|
||||
|
@ -30,6 +31,10 @@ def user_agent do
|
|||
custom ->
|
||||
custom
|
||||
end
|
||||
else
|
||||
# fallback, if endpoint is not started yet
|
||||
"Pleroma Data Loader"
|
||||
end
|
||||
end
|
||||
|
||||
# See http://elixir-lang.org/docs/stable/elixir/Application.html
|
||||
|
|
Loading…
Reference in New Issue