Emoji reactions containing custom emojis from
remote instances were assumed to already have
been downloaded and stored in the database.
This might obviously not be the case.
The margins of the elements above and below the
main reaction list element overlapped before
reactions were added. Adding display: none to
empty reaction bars restores this exact look.
This also adds the comment in action_bar.js to
status_action_bar.js, clarifying that a future
version could improve this code by modifying
EmojiPickerDropdown.
Status reactions had an API similar to that of
announcement reactions, using PUT and DELETE at a
single endpoint. I believe that for statuses, it
makes more sense to follow the convention of the
other interactions and use separate POST endpoints
for create and destroy respectively.
Turns out the strange error where it would delete
the wrong reaction occurred because I forgot to
pass the emoji name to the query, which resulted
in the database deleting the first reaction it
found. Also, this removes the unused set_reaction
callback and includes the Authorization module for
the status reactions controller.
Reactions will be backported to the vanilla
flavour, which requires all related settings to
be accessible from the vanilla settings page
rather than the glitch specific settings modal.
This adds an extra item to the local settings for
specifying the number of reactions shown in toots.
The detailed status view always shows all
reactions.
Too many reactions on a single post quickly get
spammy, so they are now sorted by count and only
the first MAX_REACTIONS number of different
emojis are actually displayed.
the maximum number of reactions was previously
hardcoded to 8. this commit also fixes an
incorrect query in StatusReactionValidator where
it didn't count per-user reactions but the total
amount of different ones.
Conflicts:
- `app/controllers/auth/confirmations_controller.rb`:
Upstream merged our captcha code, but there are some
conflicts due to glitch-soc's theming system.
- `app/views/admin/settings/registrations/show.html.haml`:
Upstream merged our captcha code, but there are some
conflicts due to glitch-soc's theming system.
Additional changes:
- `Gemfile`:
Upstream added hcaptcha dependency in another place in the file.
- `config/settings.yml`:
Upstream added the `captcha_enabled` setting in another place in the file.