Commit graph

10474 commits

Author SHA1 Message Date
fef
51e441bbda
properly disable reactions when not logged in 2022-12-04 12:33:47 +00:00
fef
35cd14e810
serialize custom emoji reactions properly for AP
Akkoma and possibly others expect the `tag` field
in an EmojiReact activity to be an array, not just
a single object, so it's being wrapped into one
now.  I'm not entirely sure whether this is the
idiomatic way of doing it tbh, but it works fine.
2022-12-04 10:52:02 +00:00
fef
be75ee47ad
also disable reaction buttons in vanilla flavour 2022-12-04 08:47:24 +00:00
fef
9b2166a3f0
disable reaction button when not signed in 2022-12-03 16:55:37 +00:00
fef
fb0f9c2174
fix image for new custom emoji reactions 2022-12-03 16:20:29 +00:00
fef
b7a6243272
display external custom emoji reactions properly
Using an emoji map was completely unnecessary in
the first place, because the reaction list from
the API response includes URLs for every custom
emoji anyway.  The reaction list now also contains
a boolean field indicating whether it is an
external custom emoji, which is required because
people should only be able to react with Unicode
emojis and local custom ones, not with custom
emojis from other servers.
2022-12-03 11:57:00 +00:00
fef
ccf4f46d7f
handle incoming custom emoji reactions properly 2022-12-03 10:22:15 +00:00
fef
8ad172535e
support Undo action for EmojiReaction 2022-12-03 08:24:23 +00:00
fef
95e198af20
download remote custom emojis from reactions
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.
2022-12-02 17:02:06 +00:00
fef
739ce56c7d
fix integer cast bug
Gotta love Rails.
2022-12-02 10:17:59 +00:00
fef
d79615dd27
sanitize setting for number of visible reactions
This is kind of a hack, but the lack of
validation for settings unfortunately makes it
necessary.
2022-12-02 09:37:56 +00:00
fef
8855c53d5b
Merge commit 'e1530a66efba52020f6f0d2643c3b63947cef209' 2022-12-02 08:28:11 +00:00
Jeremy Kescher
e1530a66ef
Add reaction limit to instance serializer 2022-12-02 08:05:10 +01:00
fef
cff48e5ad1
fix padding on posts without reactions
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.
2022-12-02 02:57:19 +01:00
fef
0301bbb406
fix padding on posts without reactions
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.
2022-12-02 01:52:59 +00:00
fef
c501a17b1f
merge catstodon/main into main 2022-12-02 01:41:43 +00:00
fef
e48573570a
rename nop handler to handleNoOp
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.
2022-12-02 02:01:14 +01:00
fef
e896b802d2
rename nop handler to handleNoOp
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.
2022-12-02 01:00:08 +00:00
fef
5b024455a7
fix up merge errors
See 57b7968504
2022-12-01 23:35:49 +00:00
fef
57b7968504
merge nyastodon-specific changes back in
This was caused by an accidental rebase that i
"fixed" by force-pushing, which caused nyastodon
to be even with glitch-soc/main.  oops.
2022-12-01 23:23:12 +00:00
fef
e27a610ada
cleanup JS imports and other minor stuff 2022-12-01 23:34:42 +01:00
fef
8ca3b6525d
cleanup JS imports and other minor stuff 2022-12-01 22:30:39 +00:00
fef
49b0f93cf6
remove unnecessary parameter 2022-12-01 22:37:30 +01:00
fef
059cc99934
change reaction api to match other interactions
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.
2022-12-01 22:37:30 +01:00
fef
30362cb520
fix reaction deletion bug and clean up controller
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.
2022-12-01 22:37:29 +01:00
fef
a1dc767f8c
remove outdated comments 2022-12-01 22:37:29 +01:00
fef
09a85f2504
clean up new imports in vanilla flavour 2022-12-01 22:37:29 +01:00
fef
1922a5d92d
backport emoji reactions to vanilla flavour 2022-12-01 22:37:29 +01:00
fef
3f0eca5f4b
make number of visible reactions a vanilla setting
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.
2022-12-01 22:37:29 +01:00
fef
b0ae82beb2
make number of displayed reactions a setting
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.
2022-12-01 22:37:28 +01:00
fef
7c11bd1df2
change default reaction limit to 1 2022-12-01 22:37:28 +01:00
fef
53c79b8e3a
limit number of reactions displayed
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.
2022-12-01 22:37:28 +01:00
fef
91ca188f51
fix reaction margins and paddings 2022-12-01 22:37:28 +01:00
fef
eb1ecbd7e8
cleanup frontend emoji reaction code 2022-12-01 22:37:28 +01:00
fef
8503bdf46d
cleanup backend emoji reaction code 2022-12-01 22:37:28 +01:00
fef
58869dee10
fix padding for reaction button 2022-12-01 22:37:28 +01:00
fef
02b61f0080
handle misskey reactions properly
misskey federates emoji reactions as likes.
2022-12-01 22:37:27 +01:00
fef
5fe08b76dd
move react button to action bar 2022-12-01 22:37:27 +01:00
fef
d3ff2b670e
cherry-pick emoji reaction changes 2022-12-01 22:37:27 +01:00
fef
c45431a1b8
make frontend fetch reaction limit
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.
2022-12-01 22:37:27 +01:00
fef
ab346f4ba0
make status reaction count limit configurable 2022-12-01 22:37:27 +01:00
fef
d43a993f36
remove accidentally created file 2022-12-01 22:37:27 +01:00
fef
9cc751f5f1
federate emoji reactions
this is kind of experimental, but it should work
in theory.  at least i tested it with a remove
akkoma instance and it didn't crash.
2022-12-01 22:37:27 +01:00
fef
852c57c308
show reactions in detailed status view 2022-12-01 22:37:26 +01:00
fef
fbf8e3d869
add frontend for emoji reactions
this is still pretty bare bones but hey, it works.
2022-12-01 22:37:26 +01:00
fef
493f746150
add backend support for status emoji reactions
turns out we can just reuse the code for
announcement reactions.
2022-12-01 22:37:26 +01:00
Jeremy Kescher
32600375b3
Merge remote-tracking branch 'upstream/main' into develop 2022-12-01 20:57:06 +01:00
Claire
4ac6601476
Port navigation bar from upstream (#1986)
Fixes #1977
2022-12-01 20:06:08 +01:00
Claire
fd6f9bf7a7 Merge branch 'main' into glitch-soc/merge-upstream 2022-12-01 11:08:52 +01:00
Claire
68d1df8bc3
Fix some performance issues with /admin/instances (#21907)
/admin/instances?availability=failing remains wholly unefficient
2022-12-01 10:32:10 +01:00