summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2023-03-09 13:13:14 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2023-03-09 13:13:14 +0000
commitf5c6e44731b7f2a06f0ee0e9dec3a020be9bb48e (patch)
tree6514e0e9a8f60c3b2878c52c5f00d3d49d950235 /lib
parent5cc23dc38292513926640af7ea3f29eff7f25f66 (diff)
parentd83f16fe44210517ceec7bc7786728c1f4d81627 (diff)
downloadpleroma-f5c6e44731b7f2a06f0ee0e9dec3a020be9bb48e.tar.gz
pleroma-f5c6e44731b7f2a06f0ee0e9dec3a020be9bb48e.zip
Merge branch 'tusooa/block-rel' into 'develop'
Allow with_relationships param for blocks See merge request pleroma/pleroma!3843
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/api_spec/operations/account_operation.ex2
-rw-r--r--lib/pleroma/web/mastodon_api/controllers/account_controller.ex7
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex
index 294590186..f2897a3a3 100644
--- a/lib/pleroma/web/api_spec/operations/account_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/account_operation.ex
@@ -452,7 +452,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do
operationId: "AccountController.blocks",
description: "View your blocks. See also accounts/:id/{block,unblock}",
security: [%{"oAuth" => ["read:blocks"]}],
- parameters: pagination_params(),
+ parameters: [with_relationships_param() | pagination_params()],
responses: %{
200 => Operation.response("Accounts", "application/json", array_of_accounts())
}
diff --git a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
index 02dfc552f..c313a0e97 100644
--- a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
+++ b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex
@@ -540,7 +540,12 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
conn
|> add_link_headers(users)
- |> render("index.json", users: users, for: user, as: :user)
+ |> render("index.json",
+ users: users,
+ for: user,
+ as: :user,
+ embed_relationships: embed_relationships?(params)
+ )
end
@doc "GET /api/v1/accounts/lookup"