Emoji reactions: Change cache and reply format

This commit is contained in:
lain 2020-01-22 13:57:42 +01:00
commit dd3fc50ea4
6 changed files with 70 additions and 40 deletions

View file

@ -62,7 +62,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIControllerTest do
|> get("/api/v1/pleroma/statuses/#{activity.id}/emoji_reactions_by")
|> json_response(200)
assert result == %{}
assert result == []
{:ok, _, _} = CommonAPI.react_with_emoji(activity.id, other_user, "🎅")
@ -71,7 +71,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIControllerTest do
|> get("/api/v1/pleroma/statuses/#{activity.id}/emoji_reactions_by")
|> json_response(200)
[represented_user] = result["🎅"]
[["🎅", [represented_user]]] = result
assert represented_user["id"] == other_user.id
end