X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fmastodon_api%2Fviews%2Faccount_view.ex;h=d2a4dd3669fa5fae8f24734fecb1b216136cf879;hb=14b086eec22486d1efc8248f5f157696e7621e5b;hp=1d5918988822400da00be251f1948ca660a77f7e;hpb=d49109ca17f980e118cd5ab97bc1139e3bd14402;p=akkoma diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex index 1d5918988..d2a4dd366 100644 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@ -5,19 +5,15 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do alias Pleroma.Web.CommonAPI.Utils alias Pleroma.Web.MediaProxy - defp image_url(%{"url" => [ %{ "href" => href } | _ ]}), do: href - defp image_url(_), do: nil - def render("accounts.json", %{users: users} = opts) do render_many(users, AccountView, "account.json", opts) end def render("account.json", %{user: user}) do image = User.avatar_url(user) |> MediaProxy.url() + header = User.banner_url(user) |> MediaProxy.url() user_info = User.user_info(user) - header = (image_url(user.info["banner"]) || "https://placehold.it/700x335") |> MediaProxy.url() - %{ id: to_string(user.id), username: hd(String.split(user.nickname, "@")),