Emoji reactions: Add `reacted` field
1 unresolved thread
1 unresolved thread
This is an analog to the favourited
and reblogged
fields.
cc @shpuld
Merge request reports
Activity
mentioned in merge request pleroma-fe!1051 (merged)
47 47 Object.normalize(activity) do 48 48 reactions = 49 49 emoji_reactions 50 |> Enum.map(fn [emoji, users] -> 51 users = Enum.map(users, &User.get_cached_by_ap_id/1) 50 |> Enum.map(fn [emoji, user_ap_ids] -> 51 users = 52 Enum.map(user_ap_ids, &User.get_cached_by_ap_id/1) 53 |> Enum.filter(& &1) 52 54 53 55 %{ 54 56 emoji: emoji, 55 57 count: length(users), 56 accounts: AccountView.render("index.json", %{users: users, for: user, as: :user}) 58 accounts: AccountView.render("index.json", %{users: users, for: user, as: :user}), 59 reacted: !!(user && user.ap_id in user_ap_ids) mentioned in commit 263abe3b
Please register or sign in to reply