forked from mirrors/akkoma
Correct ordering for block/mutes
This commit is contained in:
parent
1dc8cc731c
commit
723bd123a0
|
@ -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)
|
||||||
|
|
|
@ -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}}
|
||||||
}
|
}
|
||||||
] =
|
] =
|
||||||
|
|
Loading…
Reference in a new issue