Emoji reactions: Change cache and reply format
[akkoma] / lib / pleroma / web / mastodon_api / views / status_view.ex
index b59ac39bc4908f6d7453b6d2fb1c70976d759ee9..64a97896aab9f985de0017d9268424c7453e7ec0 100644 (file)
@@ -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
 
     %{