Add profile custom fields to ActivityPub.UserView
This commit is contained in:
parent
a22f540fc4
commit
88598c9baf
2 changed files with 22 additions and 0 deletions
|
|
@ -80,6 +80,11 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
|> Transmogrifier.add_emoji_tags()
|
||||
|> Map.get("tag", [])
|
||||
|
||||
fields =
|
||||
user.info
|
||||
|> User.Info.fields()
|
||||
|> Enum.map(&Map.put(&1, "type", "PropertyValue"))
|
||||
|
||||
%{
|
||||
"id" => user.ap_id,
|
||||
"type" => "Person",
|
||||
|
|
@ -98,6 +103,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
|
|||
"publicKeyPem" => public_key
|
||||
},
|
||||
"endpoints" => endpoints,
|
||||
"attachment" => fields,
|
||||
"tag" => (user.info.source_data["tag"] || []) ++ user_tags
|
||||
}
|
||||
|> Map.merge(maybe_make_image(&User.avatar_url/2, "icon", user))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue