mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-25 09:30:29 +00:00
Remove useless with clause
This commit is contained in:
parent
22a16a3e81
commit
9d32f38b39
1 changed files with 17 additions and 17 deletions
|
@ -312,23 +312,23 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
|
||||||
%{"nickname" => nickname, "page" => page?} = params
|
%{"nickname" => nickname, "page" => page?} = params
|
||||||
)
|
)
|
||||||
when page? in [true, "true"] do
|
when page? in [true, "true"] do
|
||||||
with activities <-
|
activities =
|
||||||
(if params["max_id"] do
|
if params["max_id"] do
|
||||||
ActivityPub.fetch_activities([user.ap_id | user.following], %{
|
ActivityPub.fetch_activities([user.ap_id | user.following], %{
|
||||||
"max_id" => params["max_id"],
|
"max_id" => params["max_id"],
|
||||||
"limit" => 10
|
"limit" => 10
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
ActivityPub.fetch_activities([user.ap_id | user.following], %{"limit" => 10})
|
ActivityPub.fetch_activities([user.ap_id | user.following], %{"limit" => 10})
|
||||||
end) do
|
end
|
||||||
conn
|
|
||||||
|> put_resp_content_type("application/activity+json")
|
conn
|
||||||
|> put_view(UserView)
|
|> put_resp_content_type("application/activity+json")
|
||||||
|> render("activity_collection_page.json", %{
|
|> put_view(UserView)
|
||||||
activities: activities,
|
|> render("activity_collection_page.json", %{
|
||||||
iri: "#{user.ap_id}/inbox"
|
activities: activities,
|
||||||
})
|
iri: "#{user.ap_id}/inbox"
|
||||||
end
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def read_inbox(%{assigns: %{user: %{nickname: nickname} = user}} = conn, %{
|
def read_inbox(%{assigns: %{user: %{nickname: nickname} = user}} = conn, %{
|
||||||
|
|
Loading…
Reference in a new issue