ActivityPub: Ingest information about chat acceptance.

This commit is contained in:
lain 2020-07-03 13:58:34 +02:00
commit 5c0bf4c472
4 changed files with 41 additions and 30 deletions

View file

@ -437,7 +437,8 @@ defmodule Pleroma.User do
:discoverable,
:invisible,
:actor_type,
:also_known_as
:also_known_as,
:accepts_chat_messages
]
)
|> validate_required([:name, :ap_id])

View file

@ -1224,6 +1224,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
end)
locked = data["manuallyApprovesFollowers"] || false
accepts_chat_messages = data["acceptsChatMessages"]
data = Transmogrifier.maybe_fix_user_object(data)
discoverable = data["discoverable"] || false
invisible = data["invisible"] || false
@ -1262,7 +1263,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
also_known_as: Map.get(data, "alsoKnownAs", []),
public_key: public_key,
inbox: data["inbox"],
shared_inbox: shared_inbox
shared_inbox: shared_inbox,
accepts_chat_messages: accepts_chat_messages
}
# nickname can be nil because of virtual actors