EmojiReactions: Add Mastodon-aligned reaction endpoints, change response
This commit is contained in:
parent
f13b7878b4
commit
f875b9650a
5 changed files with 96 additions and 12 deletions
|
|
@ -242,9 +242,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||
with %{data: %{"reactions" => emoji_reactions}} <- object do
|
||||
Enum.map(emoji_reactions, fn [emoji, users] ->
|
||||
%{
|
||||
emoji: emoji,
|
||||
name: emoji,
|
||||
count: length(users),
|
||||
reacted: !!(opts[:for] && opts[:for].ap_id in users)
|
||||
me: !!(opts[:for] && opts[:for].ap_id in users)
|
||||
}
|
||||
end)
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue