"tags" => user.tags || [],
"is_confirmed" => user.is_confirmed,
"is_approved" => user.is_approved,
+ "is_suggested" => user.is_suggested,
"url" => user.uri || user.ap_id,
"registration_reason" => user.registration_reason,
"actor_type" => user.actor_type,
ap_id: user.ap_id,
also_known_as: user.also_known_as,
is_confirmed: user.is_confirmed,
+ is_suggested: user.is_suggested,
tags: user.tags,
hide_followers_count: user.hide_followers_count,
hide_follows_count: user.hide_follows_count,
user1 = insert(:user, is_suggested: false)
user2 = insert(:user, is_suggested: false)
- _response =
+ response =
conn
|> put_req_header("content-type", "application/json")
|> patch(
)
|> json_response_and_validate_schema(200)
+ assert Enum.map(response["users"], & &1["is_suggested"]) == [true, true]
[user1, user2] = Repo.reload!([user1, user2])
assert user1.is_suggested
user1 = insert(:user, is_suggested: true)
user2 = insert(:user, is_suggested: true)
- _response =
+ response =
conn
|> put_req_header("content-type", "application/json")
|> patch(
)
|> json_response_and_validate_schema(200)
+ assert Enum.map(response["users"], & &1["is_suggested"]) == [false, false]
[user1, user2] = Repo.reload!([user1, user2])
refute user1.is_suggested
"display_name" => HTML.strip_tags(user.name || user.nickname),
"is_confirmed" => true,
"is_approved" => true,
+ "is_suggested" => false,
"url" => user.ap_id,
"registration_reason" => nil,
"actor_type" => "Person",