third_party_engine:
"http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
timeout: 300_000,
+ limit: 23,
web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
# Import environment specific config. This must remain at the bottom
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)
@httpoison.get(url, [], timeout: timeout, recv_timeout: timeout),
{:ok, data} <- Jason.decode(body) do
data2 =
- Enum.slice(data, 0, 40)
+ Enum.slice(data, 0, limit)
|> Enum.map(fn x ->
Map.put(
x,
enabled: Keyword.get(suggestions, :enabled, false),
thirdPartyEngine: Keyword.get(suggestions, :third_party_engine, ""),
timeout: Keyword.get(suggestions, :timeout, 5000),
+ limit: Keyword.get(suggestions, :limit, 23),
web: Keyword.get(suggestions, :web, "")
},
staffAccounts: staff_accounts,