forked from AkkomaGang/akkoma
Do not need a function to provide fallback value with default defined in config.exs
This commit is contained in:
parent
bf8310f380
commit
df5e048cbb
1 changed files with 1 additions and 6 deletions
|
@ -23,7 +23,7 @@ def render("show.json", _) do
|
||||||
streaming_api: Pleroma.Web.Endpoint.websocket_url()
|
streaming_api: Pleroma.Web.Endpoint.websocket_url()
|
||||||
},
|
},
|
||||||
stats: Pleroma.Stats.get_stats(),
|
stats: Pleroma.Stats.get_stats(),
|
||||||
thumbnail: instance_thumbnail(),
|
thumbnail: Keyword.get(instance, :instance_thumbnail),
|
||||||
languages: ["en"],
|
languages: ["en"],
|
||||||
registrations: Keyword.get(instance, :registrations_open),
|
registrations: Keyword.get(instance, :registrations_open),
|
||||||
# Extra (not present in Mastodon):
|
# Extra (not present in Mastodon):
|
||||||
|
@ -88,9 +88,4 @@ def federation do
|
||||||
end
|
end
|
||||||
|> Map.put(:enabled, Config.get([:instance, :federating]))
|
|> Map.put(:enabled, Config.get([:instance, :federating]))
|
||||||
end
|
end
|
||||||
|
|
||||||
defp instance_thumbnail do
|
|
||||||
Pleroma.Config.get([:instance, :instance_thumbnail]) ||
|
|
||||||
"#{Pleroma.Web.base_url()}/instance/thumbnail.jpeg"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue