X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Fpleroma_api%2Fviews%2Femoji_reaction_view.ex;h=c94527e6d284929e0879483cdd3fa0409250e1fb;hb=543e9402d64bce556f85294f91dc690c9acec51f;hp=84d2d303dae6223a9c53a8f48a72d38d64cd6c91;hpb=6b84c62d4a51cb17192945d1b67999b2c56a23d2;p=akkoma
diff --git a/lib/pleroma/web/pleroma_api/views/emoji_reaction_view.ex b/lib/pleroma/web/pleroma_api/views/emoji_reaction_view.ex
index 84d2d303d..c94527e6d 100644
--- a/lib/pleroma/web/pleroma_api/views/emoji_reaction_view.ex
+++ b/lib/pleroma/web/pleroma_api/views/emoji_reaction_view.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.PleromaAPI.EmojiReactionView do
@@ -11,13 +11,13 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionView do
render_many(emoji_reactions, __MODULE__, "show.json", opts)
end
- def render("show.json", %{emoji_reaction: [emoji, user_ap_ids], user: user}) do
+ def render("show.json", %{emoji_reaction: {emoji, user_ap_ids}, user: user}) do
users = fetch_users(user_ap_ids)
%{
name: emoji,
count: length(users),
- accounts: render(AccountView, "index.json", users: users, for: user, as: :user),
+ accounts: render(AccountView, "index.json", users: users, for: user),
me: !!(user && user.ap_id in user_ap_ids)
}
end
@@ -26,7 +26,7 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionView do
user_ap_ids
|> Enum.map(&Pleroma.User.get_cached_by_ap_id/1)
|> Enum.filter(fn
- %{deactivated: false} -> true
+ %{is_active: true} -> true
_ -> false
end)
end