Emoji reactions: Change api format once more

This commit is contained in:
lain 2020-01-24 10:52:24 +01:00
commit 347f3ed2c6
4 changed files with 12 additions and 4 deletions

View file

@ -256,7 +256,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
emoji_reactions =
with %{data: %{"reactions" => emoji_reactions}} <- object do
Enum.map(emoji_reactions, fn [emoji, users] ->
[emoji, length(users)]
%{emoji: emoji, count: length(users)}
end)
else
_ -> []