Add custom fields to TwitterAPI.UserView
This commit is contained in:
parent
069951722f
commit
a22f540fc4
2 changed files with 3 additions and 6 deletions
|
|
@ -407,6 +407,8 @@ defmodule Pleroma.User.Info do
|
|||
cast(info, params, [:muted_reblogs])
|
||||
end
|
||||
|
||||
# ``fields`` is an array of mastodon profile field, containing ``{"name": "…", "value": "…"}``.
|
||||
# For example: [{"name": "Pronoun", "value": "she/her"}, …]
|
||||
def fields(%{source_data: %{"attachment" => attachment}}) do
|
||||
attachment
|
||||
|> Enum.filter(fn %{"type" => t} -> t == "PropertyValue" end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue