aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex3
-rw-r--r--lib/pleroma/web/nodeinfo/nodeinfo_controller.ex1
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index f2fcc76ad..e5d4245c4 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -1148,6 +1148,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
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)
@@ -1161,7 +1162,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
@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,
diff --git a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
index 67cef004a..9c4827426 100644
--- a/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
+++ b/lib/pleroma/web/nodeinfo/nodeinfo_controller.ex
@@ -59,6 +59,7 @@ defmodule Pleroma.Web.Nodeinfo.NodeinfoController do
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,