Like in *key, *oma users can react with arbitrary emojis.
Unlike in *key, a single user can add multiple emoji reactions
to a single post and favouriting still exists as a separate concept.
By using only the Mastodon API for *oma, favourites still get
interpreted but emoji reactions aren’t taken into account at all.
Fix this by adding support for the relevant Pleroma APIs.
To avoid a bias towards fav+react or multiple reacts on a single post
and to be more similar to connection strengths in Mastodon and *key,
aggregate reacts and favs and count them only once per per user and
post.
It is not clear whether the existence of a non-empty
pleroma/emoji_reactions field in notes data already implies support for
the reactions API endpoint. It at least seems sensible and would allow
to skip the initial feature metadata check, but let’s stick to the safe
approach for now.
Fedibird also supports emoji reacts and (like Akkoma >= 3.2.0) provides
the emoji_reactions sections at the toplevel of notes with an array of
account IDs included for every reaction. At first glance Fedibird
doesn't seem to provide a /reactions API or similar with more detailed
user info directly included. Supporting Fedibird would thereofore
require additional user info lookups at the end.
This commit makes no attempt at supporting Fedibird or
taking advantage of the account_ids array for Akkoma.
Co-authored-by: Natty <natty.sh.git@gmail.com>
Fixes a mix-up from 15579d7e78.
Since replies are omitted from the gathered notes, this effectively
removed reply evaluation from Mastodon API, but instead added the
author of quoted posts as well as replies to the quoted post to the
circle.