Apply suggestion to lib/pleroma/web/activity_pub/activity_pub_controller.ex
This commit is contained in:
parent
d4a76b0a6f
commit
22a16a3e81
@ -200,9 +200,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
|
|||||||
def outbox(conn, %{"nickname" => nickname, "page" => page?} = params)
|
def outbox(conn, %{"nickname" => nickname, "page" => page?} = params)
|
||||||
when page? in [true, "true"] do
|
when page? in [true, "true"] do
|
||||||
with %User{} = user <- User.get_cached_by_nickname(nickname),
|
with %User{} = user <- User.get_cached_by_nickname(nickname),
|
||||||
{:ok, user} <- User.ensure_keys_present(user),
|
{:ok, user} <- User.ensure_keys_present(user) do
|
||||||
activities <-
|
activities =
|
||||||
(if params["max_id"] do
|
if params["max_id"] do
|
||||||
ActivityPub.fetch_user_activities(user, nil, %{
|
ActivityPub.fetch_user_activities(user, nil, %{
|
||||||
"max_id" => params["max_id"],
|
"max_id" => params["max_id"],
|
||||||
# This is a hack because postgres generates inefficient queries when filtering by 'Answer',
|
# This is a hack because postgres generates inefficient queries when filtering by 'Answer',
|
||||||
@ -215,7 +215,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
|
|||||||
"limit" => 10,
|
"limit" => 10,
|
||||||
"include_poll_votes" => true
|
"include_poll_votes" => true
|
||||||
})
|
})
|
||||||
end) do
|
end
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|> put_resp_content_type("application/activity+json")
|
|> put_resp_content_type("application/activity+json")
|
||||||
|> put_view(UserView)
|
|> put_view(UserView)
|
||||||
|
Loading…
Reference in New Issue
Block a user