1
0
Fork 0
forked from mirrors/akkoma

Correct ordering for block/mutes

This commit is contained in:
FloatingGhost 2023-08-04 15:18:07 +01:00
parent 1dc8cc731c
commit 723bd123a0
2 changed files with 4 additions and 4 deletions

View file

@ -497,7 +497,7 @@ def mutes(%{assigns: %{user: user}} = conn, params) do
users = users =
user user
|> User.muted_users_relation(_restrict_deactivated = true) |> User.muted_users_relation(_restrict_deactivated = true)
|> Pleroma.Pagination.fetch_paginated(Map.put(params, :skip_order, true)) |> Pleroma.Pagination.fetch_paginated(params)
conn conn
|> add_link_headers(users) |> add_link_headers(users)
@ -514,7 +514,7 @@ def blocks(%{assigns: %{user: user}} = conn, params) do
users = users =
user user
|> User.blocked_users_relation(_restrict_deactivated = true) |> User.blocked_users_relation(_restrict_deactivated = true)
|> Pleroma.Pagination.fetch_paginated(Map.put(params, :skip_order, true)) |> Pleroma.Pagination.fetch_paginated(params)
conn conn
|> add_link_headers(users) |> add_link_headers(users)

View file

@ -1915,7 +1915,7 @@ test "list of blocks with with_relationships parameter" do
assert [ assert [
%{ %{
"id" => ^id1, "id" => ^id3,
"pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}} "pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}}
}, },
%{ %{
@ -1923,7 +1923,7 @@ test "list of blocks with with_relationships parameter" do
"pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}} "pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}}
}, },
%{ %{
"id" => ^id3, "id" => ^id1,
"pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}} "pleroma" => %{"relationship" => %{"blocking" => true, "followed_by" => false}}
} }
] = ] =