Emoji reactions: Change cache and reply format
This commit is contained in:
parent
04c9ca5d68
commit
dd3fc50ea4
6 changed files with 70 additions and 40 deletions
|
|
@ -255,12 +255,11 @@ 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)}
|
||||
Enum.map(emoji_reactions, fn [emoji, users] ->
|
||||
[emoji, length(users)]
|
||||
end)
|
||||
|> Enum.into(%{})
|
||||
else
|
||||
_ -> %{}
|
||||
_ -> []
|
||||
end
|
||||
|
||||
%{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue