forked from AkkomaGang/akkoma
Remove useless with clause
This commit is contained in:
parent
22a16a3e81
commit
9d32f38b39
1 changed files with 17 additions and 17 deletions
|
@ -312,15 +312,16 @@ def read_inbox(
|
|||
%{"nickname" => nickname, "page" => page?} = params
|
||||
)
|
||||
when page? in [true, "true"] do
|
||||
with activities <-
|
||||
(if params["max_id"] do
|
||||
activities =
|
||||
if params["max_id"] do
|
||||
ActivityPub.fetch_activities([user.ap_id | user.following], %{
|
||||
"max_id" => params["max_id"],
|
||||
"limit" => 10
|
||||
})
|
||||
else
|
||||
ActivityPub.fetch_activities([user.ap_id | user.following], %{"limit" => 10})
|
||||
end) do
|
||||
end
|
||||
|
||||
conn
|
||||
|> put_resp_content_type("application/activity+json")
|
||||
|> put_view(UserView)
|
||||
|
@ -329,7 +330,6 @@ def read_inbox(
|
|||
iri: "#{user.ap_id}/inbox"
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
def read_inbox(%{assigns: %{user: %{nickname: nickname} = user}} = conn, %{
|
||||
"nickname" => nickname
|
||||
|
|
Loading…
Reference in a new issue