EmojiReactions: Add Mastodon-aligned reaction endpoints, change response

This commit is contained in:
Lain Soykaf 2020-02-07 14:52:13 +01:00
commit f875b9650a
5 changed files with 96 additions and 12 deletions

View file

@ -37,15 +37,15 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
status = StatusView.render("show.json", activity: activity)
assert status[:pleroma][:emoji_reactions] == [
%{emoji: "", count: 2, reacted: false},
%{emoji: "🍵", count: 1, reacted: false}
%{name: "", count: 2, me: false},
%{name: "🍵", count: 1, me: false}
]
status = StatusView.render("show.json", activity: activity, for: user)
assert status[:pleroma][:emoji_reactions] == [
%{emoji: "", count: 2, reacted: true},
%{emoji: "🍵", count: 1, reacted: false}
%{name: "", count: 2, me: true},
%{name: "🍵", count: 1, me: false}
]
end