rework to use properties instead of compound typing, per SocialCG
This commit is contained in:
parent
189a288925
commit
c9280b9730
@ -1106,13 +1106,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
|
||||
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"],
|
||||
|
@ -600,8 +600,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
||||
"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)
|
||||
|
@ -55,7 +55,8 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
||||
"owner" => user.ap_id,
|
||||
"publicKeyPem" => public_key
|
||||
},
|
||||
"endpoints" => endpoints
|
||||
"endpoints" => endpoints,
|
||||
"invisible" => User.invisible?(user)
|
||||
}
|
||||
|> Map.merge(Utils.make_json_ld_header())
|
||||
end
|
||||
|
@ -19,6 +19,7 @@
|
||||
"value": "schema:value",
|
||||
"sensitive": "as:sensitive",
|
||||
"litepub": "http://litepub.social/ns#",
|
||||
"invisible": "litepub:invisible",
|
||||
"directMessage": "litepub:directMessage",
|
||||
"listMessage": {
|
||||
"@id": "litepub:listMessage",
|
||||
|
@ -12,7 +12,8 @@
|
||||
"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",
|
||||
|
Loading…
Reference in New Issue
Block a user