Commit graph

18084 commits

Author SHA1 Message Date
fef
6fa408f1a0
delete reaction notifications when deleting status 2023-05-27 12:01:13 +02:00
fef
f87de8770b
support reacting with foreign custom emojis 2023-05-27 12:01:13 +02:00
fef
e688fac3ec
properly disable reactions when not logged in 2023-05-27 12:01:13 +02:00
fef
55e741df7d
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.
2023-05-27 12:01:13 +02:00
fef
2a64c4d028
also disable reaction buttons in vanilla flavour 2023-05-27 12:01:13 +02:00
fef
804bf4aa38
disable reaction button when not signed in 2023-05-27 12:01:13 +02:00
fef
4454aa7e99
fix image for new custom emoji reactions 2023-05-27 12:01:12 +02:00
fef
75cccfb53e
run i18n-tasks normalize 2023-05-27 12:01:12 +02:00
fef
1ca69c2513
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.
2023-05-27 12:01:12 +02:00
fef
3df2d0b1f1
handle incoming custom emoji reactions properly 2023-05-27 12:01:12 +02:00
fef
50cd1cc5f7
support Undo action for EmojiReaction 2023-05-27 12:01:12 +02:00
fef
7500ba8102
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.
2023-05-27 12:01:12 +02:00
fef
3ae691ad31
sanitize setting for number of visible reactions
This is kind of a hack, but the lack of
validation for settings unfortunately makes it
necessary.
2023-05-27 12:01:12 +02:00
Jeremy Kescher
e02b9efd45
Add reaction limit to instance serializer 2023-05-27 12:01:12 +02:00
fef
d04be8a958
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.
2023-05-27 12:01:12 +02:00
fef
adc1cd4823
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.
2023-05-27 12:01:12 +02:00
fef
6ea8080771
cleanup JS imports and other minor stuff 2023-05-27 12:01:10 +02:00
fef
4690c67bdc
remove unnecessary parameter 2023-05-27 11:59:32 +02:00
fef
48ca4fa744
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.
2023-05-27 11:59:32 +02:00
fef
ca89c02dec
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.
2023-05-27 11:59:32 +02:00
fef
c80a2f0df0
remove outdated comments 2023-05-27 11:59:32 +02:00
fef
2efb74cea8
clean up new imports in vanilla flavour 2023-05-27 11:59:32 +02:00
fef
a0c91c47c6
rebase with upstream 2023-05-27 11:59:32 +02:00
fef
b796afc818
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.
2023-05-27 11:59:32 +02:00
fef
f1421b6d7d
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.
2023-05-27 11:59:32 +02:00
fef
5103b384dd
change default reaction limit to 1 2023-05-27 11:59:32 +02:00
fef
0bb2d62c96
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.
2023-05-27 11:59:32 +02:00
fef
b25d27667c
fix reaction margins and paddings 2023-05-27 11:59:32 +02:00
fef
50f91f5510
cleanup frontend emoji reaction code 2023-05-27 11:59:32 +02:00
fef
4a8b6b83aa
cleanup backend emoji reaction code 2023-05-27 11:59:32 +02:00
fef
1791024b73
fix padding for reaction button 2023-05-27 11:59:32 +02:00
fef
86e058d00e
handle misskey reactions properly
misskey federates emoji reactions as likes.
2023-05-27 11:59:32 +02:00
fef
ed636f695f
move react button to action bar 2023-05-27 11:59:30 +02:00
fef
f9b72463b4
cherry-pick emoji reaction changes 2023-05-27 11:58:20 +02:00
fef
f1952244d1
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.
2023-05-27 11:58:20 +02:00
fef
c369bd3154
make status reaction count limit configurable 2023-05-27 11:58:20 +02:00
fef
1bbfad0512
remove accidentally created file 2023-05-27 11:58:20 +02:00
fef
7f0e61fb8d
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.
2023-05-27 11:58:20 +02:00
fef
9c7ddeedbb
show reactions in detailed status view 2023-05-27 11:58:20 +02:00
fef
44154d2c07
add frontend for emoji reactions
this is still pretty bare bones but hey, it works.
2023-05-27 11:58:20 +02:00
fef
871d6c594e
add backend support for status emoji reactions
turns out we can just reuse the code for
announcement reactions.
2023-05-27 11:58:20 +02:00
Claire
0222df6047
Merge pull request #2236 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes up to e387175fc9
2023-05-27 11:28:10 +02:00
Claire
1347ca6eb0 fixup! [Glitch] Upgrade to React 18 2023-05-26 18:44:18 +02:00
Claire
61f6cd45e3 Fix glitch-soc-only tests being broken because of test refactor 2023-05-26 00:10:57 +02:00
たいち ひ
60c7e559d8 [Glitch] Rewrite <TimelineHint /> as FC and TS
Port 9a472efe7c to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-25 23:58:54 +02:00
たいち ひ
6746e5d430 [Glitch] Rewrite <Skeleton/> as FC and TS
Port 8066118d1f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-25 23:55:36 +02:00
Claire
892b3c16f5 [Glitch] Allow scripts in post embed previews
Port 711a037660 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-25 23:52:04 +02:00
Claire
e2ab9d4dad Merge commit 'e387175fc9a3ebfd72ab45ebfe43ecfabef7b0c3' into glitch-soc/merge-upstream 2023-05-25 23:47:28 +02:00
Renaud Chaput
3b375ee395 [Glitch] Upgrade to React 18
Port 8d6aea3326 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-25 23:45:01 +02:00
Claire
45d7358100 Merge commit '8d6aea33260dedeacb3d22ac1a6d2f9cc3856a5e' into glitch-soc/merge-upstream 2023-05-25 23:18:57 +02:00