projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/develop' into reactions
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
views
/
account_view.ex
diff --git
a/lib/pleroma/web/mastodon_api/views/account_view.ex
b/lib/pleroma/web/mastodon_api/views/account_view.ex
index 8cf9e9d5c85d55ed6e9ae7b925cc224eb5cd3dce..99169ef95faecc4a2377e9ecac54259296d67d00 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/
lib/pleroma/web/mastodon_api/views/account_view.ex
@@
-11,15
+11,15
@@
defmodule Pleroma.Web.MastodonAPI.AccountView do
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MediaProxy
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Web.MediaProxy
- def render("
accounts
.json", %{users: users} = opts) do
+ def render("
index
.json", %{users: users} = opts) do
users
users
- |> render_many(AccountView, "
account
.json", opts)
+ |> render_many(AccountView, "
show
.json", opts)
|> Enum.filter(&Enum.any?/1)
end
|> Enum.filter(&Enum.any?/1)
end
- def render("
account
.json", %{user: user} = opts) do
+ def render("
show
.json", %{user: user} = opts) do
if User.visible_for?(user, opts[:for]),
if User.visible_for?(user, opts[:for]),
- do: do_render("
account
.json", opts),
+ do: do_render("
show
.json", opts),
else: %{}
end
else: %{}
end
@@
-66,7
+66,7
@@
defmodule Pleroma.Web.MastodonAPI.AccountView do
render_many(targets, AccountView, "relationship.json", user: user, as: :target)
end
render_many(targets, AccountView, "relationship.json", user: user, as: :target)
end
- defp do_render("
account
.json", %{user: user} = opts) do
+ defp do_render("
show
.json", %{user: user} = opts) do
display_name = HTML.strip_tags(user.name || user.nickname)
image = User.avatar_url(user) |> MediaProxy.url()
display_name = HTML.strip_tags(user.name || user.nickname)
image = User.avatar_url(user) |> MediaProxy.url()