Do not need a function to provide fallback value with default defined in config.exs
authorMark Felder <feld@FreeBSD.org>
Mon, 22 Jun 2020 22:39:02 +0000 (17:39 -0500)
committerMark Felder <feld@FreeBSD.org>
Mon, 22 Jun 2020 22:39:02 +0000 (17:39 -0500)
lib/pleroma/web/mastodon_api/views/instance_view.ex

index c498fe6326084e5302502a277fc29c145ba00d73..c6b54e5701ea9a0ec0f749e1a654d4f1452f1648 100644 (file)
@@ -23,7 +23,7 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
         streaming_api: Pleroma.Web.Endpoint.websocket_url()
       },
       stats: Pleroma.Stats.get_stats(),
-      thumbnail: instance_thumbnail(),
+      thumbnail: Keyword.get(instance, :instance_thumbnail),
       languages: ["en"],
       registrations: Keyword.get(instance, :registrations_open),
       # Extra (not present in Mastodon):
@@ -88,9 +88,4 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
     end
     |> Map.put(:enabled, Config.get([:instance, :federating]))
   end
-
-  defp instance_thumbnail do
-    Pleroma.Config.get([:instance, :instance_thumbnail]) ||
-      "#{Pleroma.Web.base_url()}/instance/thumbnail.jpeg"
-  end
 end