locked = data["manuallyApprovesFollowers"] || false
data = Transmogrifier.maybe_fix_user_object(data)
discoverable = data["discoverable"] || false
-
- invisible =
- if is_list(data["type"]) do
- Enum.member?(data["type"], "Invisible")
- else
- false
- end
+ invisible = data["invisible"] || false
user_data = %{
ap_id: data["id"],
"Person",
"Application",
"Service",
- "Organization",
- ["Application", "Invisible"]
+ "Organization"
] do
with %User{ap_id: ^actor_id} = actor <- User.get_cached_by_ap_id(object["id"]) do
{:ok, new_user_data} = ActivityPub.user_data_from_user_object(object)
"owner" => user.ap_id,
"publicKeyPem" => public_key
},
- "endpoints" => endpoints
+ "endpoints" => endpoints,
+ "invisible" => User.invisible?(user)
}
|> Map.merge(Utils.make_json_ld_header())
end
"value": "schema:value",
"sensitive": "as:sensitive",
"litepub": "http://litepub.social/ns#",
+ "invisible": "litepub:invisible",
"directMessage": "litepub:directMessage",
"listMessage": {
"@id": "litepub:listMessage",
"Emoji": "toot:Emoji"
}],
"id": "http://mastodon.example.org/users/admin",
- "type": ["Application", "Invisible"],
+ "type": "Application",
+ "invisible": true,
"following": "http://mastodon.example.org/users/admin/following",
"followers": "http://mastodon.example.org/users/admin/followers",
"inbox": "http://mastodon.example.org/users/admin/inbox",