Split hide_network into hide_followers & hide_followings
This commit is contained in:
parent
009273fd6e
commit
50d6183893
10 changed files with 82 additions and 41 deletions
|
|
@ -86,7 +86,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
query = from(user in query, select: [:ap_id])
|
||||
following = Repo.all(query)
|
||||
|
||||
collection(following, "#{user.ap_id}/following", page, !user.info.hide_network)
|
||||
collection(following, "#{user.ap_id}/following", page, !user.info.hide_followings)
|
||||
|> Map.merge(Utils.make_json_ld_header())
|
||||
end
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
"id" => "#{user.ap_id}/following",
|
||||
"type" => "OrderedCollection",
|
||||
"totalItems" => length(following),
|
||||
"first" => collection(following, "#{user.ap_id}/following", 1, !user.info.hide_network)
|
||||
"first" => collection(following, "#{user.ap_id}/following", 1, !user.info.hide_followings)
|
||||
}
|
||||
|> Map.merge(Utils.make_json_ld_header())
|
||||
end
|
||||
|
|
@ -109,7 +109,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
query = from(user in query, select: [:ap_id])
|
||||
followers = Repo.all(query)
|
||||
|
||||
collection(followers, "#{user.ap_id}/followers", page, !user.info.hide_network)
|
||||
collection(followers, "#{user.ap_id}/followers", page, !user.info.hide_followers)
|
||||
|> Map.merge(Utils.make_json_ld_header())
|
||||
end
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
"id" => "#{user.ap_id}/followers",
|
||||
"type" => "OrderedCollection",
|
||||
"totalItems" => length(followers),
|
||||
"first" => collection(followers, "#{user.ap_id}/followers", 1, !user.info.hide_network)
|
||||
"first" => collection(followers, "#{user.ap_id}/followers", 1, !user.info.hide_followers)
|
||||
}
|
||||
|> Map.merge(Utils.make_json_ld_header())
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue