Add custom fields to TwitterAPI.UserView
[akkoma] / lib / pleroma / user / info.ex
index fa57052fb3f39bd6ca072d2ed951c116c424127c..98b894223b17f85d8eab4cdb72a3e9be9c805316 100644 (file)
@@ -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)