mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-09 17:55:11 +00:00
user agent if Endpoint is not started yet
This commit is contained in:
parent
47ff425cfd
commit
a11f23c130
|
@ -22,13 +22,18 @@ defmodule Pleroma.Application do
|
||||||
def repository, do: @repository
|
def repository, do: @repository
|
||||||
|
|
||||||
def user_agent do
|
def user_agent do
|
||||||
case Config.get([:http, :user_agent], :default) do
|
if Process.whereis(Pleroma.Web.Endpoint) do
|
||||||
:default ->
|
case Config.get([:http, :user_agent], :default) do
|
||||||
info = "#{Pleroma.Web.base_url()} <#{Config.get([:instance, :email], "")}>"
|
:default ->
|
||||||
named_version() <> "; " <> info
|
info = "#{Pleroma.Web.base_url()} <#{Config.get([:instance, :email], "")}>"
|
||||||
|
named_version() <> "; " <> info
|
||||||
|
|
||||||
custom ->
|
custom ->
|
||||||
custom
|
custom
|
||||||
|
end
|
||||||
|
else
|
||||||
|
# fallback, if endpoint is not started yet
|
||||||
|
"Pleroma Data Loader"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue