aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/user
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-07-25 19:33:18 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-08-14 14:52:54 +0700
commita22f540fc42dd941631e94fe931d1f655b2904a1 (patch)
tree9e354980165e25063f94aeafdd030ad0bb80876c /lib/pleroma/user
parent069951722f9b674a759e0b8683aff9c03019467b (diff)
downloadpleroma-a22f540fc42dd941631e94fe931d1f655b2904a1.tar.gz
Add custom fields to TwitterAPI.UserView
Diffstat (limited to 'lib/pleroma/user')
-rw-r--r--lib/pleroma/user/info.ex2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/user/info.ex b/lib/pleroma/user/info.ex
index fa57052fb..98b894223 100644
--- a/lib/pleroma/user/info.ex
+++ b/lib/pleroma/user/info.ex
@@ -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)