diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-11-20 18:54:48 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-11-20 18:54:48 +0000 |
commit | c196754b4ddf53a68f42ac26a98c42eeba78a12b (patch) | |
tree | e08f49fd2a2eaa1dbc1f55e302d99d9df30bcdd6 /lib | |
parent | ece86567335ece6325ebde05995b53735319fbe0 (diff) | |
download | pleroma-c196754b4ddf53a68f42ac26a98c42eeba78a12b.tar.gz |
mastodon api: account view: fix tests
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/account_view.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index b68845e16..bcfa8836e 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -14,10 +14,10 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do image = User.avatar_url(user) |> MediaProxy.url() header = User.banner_url(user) |> MediaProxy.url() user_info = User.user_info(user) - bot = (user.info["source_data"]["type"] || "Person") in ["Application", "Service"] + bot = (user.info.source_data["type"] || "Person") in ["Application", "Service"] emojis = - (user.info["source_data"]["tag"] || []) + (user.info.source_data["tag"] || []) |> Enum.filter(fn %{"type" => t} -> t == "Emoji" end) |> Enum.map(fn %{"icon" => %{"url" => url}, "name" => name} -> %{ @@ -29,7 +29,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do end) fields = - (user.info["source_data"]["attachment"] || []) + (user.info.source_data["attachment"] || []) |> Enum.filter(fn %{"type" => t} -> t == "PropertyValue" end) |> Enum.map(fn fields -> Map.take(fields, ["name", "value"]) end) |