- if Keyword.get(@suggestions, :enabled, false) do
- api = Keyword.get(@suggestions, :third_party_engine, "")
- timeout = Keyword.get(@suggestions, :timeout, 5000)
- limit = Keyword.get(@suggestions, :limit, 23)
-
- host =
- Application.get_env(:pleroma, Pleroma.Web.Endpoint)
- |> Keyword.get(:url)
- |> Keyword.get(:host)
+ suggestions = Pleroma.Config.get(:suggestions)
+
+ if Keyword.get(suggestions, :enabled, false) do
+ api = Keyword.get(suggestions, :third_party_engine, "")
+ timeout = Keyword.get(suggestions, :timeout, 5000)
+ limit = Keyword.get(suggestions, :limit, 23)
+
+ host = Pleroma.Config.get([Pleroma.Web.Endpoint, :url, :host])