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

@ -53,10 +53,10 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
|> Enum.filter(& &1)
%{
emoji: emoji,
name: emoji,
count: length(users),
accounts: AccountView.render("index.json", %{users: users, for: user, as: :user}),
reacted: !!(user && user.ap_id in user_ap_ids)
me: !!(user && user.ap_id in user_ap_ids)
}
end)