Commit graph

17926 commits

Author SHA1 Message Date
fef
9d1467a364
fix schema after rebase 2023-05-09 22:56:46 +02:00
fef
c05db8c765
delete reaction notifications when deleting status 2023-05-09 22:56:46 +02:00
fef
c2209aca12
support reacting with foreign custom emojis 2023-05-09 22:56:44 +02:00
fef
b46adb9a1d
properly disable reactions when not logged in 2023-05-09 22:56:07 +02:00
fef
9ad49a191c
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-09 22:56:07 +02:00
fef
f0d129fabe
also disable reaction buttons in vanilla flavour 2023-05-09 22:56:07 +02:00
fef
245f5b3f2f
disable reaction button when not signed in 2023-05-09 22:56:07 +02:00
fef
01723aef2b
fix image for new custom emoji reactions 2023-05-09 22:56:07 +02:00
fef
122abba7bc
run i18n-tasks normalize 2023-05-09 22:56:05 +02:00
fef
83bffa8b3c
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-09 22:55:28 +02:00
fef
38346d52ef
handle incoming custom emoji reactions properly 2023-05-09 22:55:28 +02:00
fef
fe084475e9
support Undo action for EmojiReaction 2023-05-09 22:55:28 +02:00
fef
d800559866
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-09 22:55:28 +02:00
fef
7792235a89
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-09 22:55:28 +02:00
Jeremy Kescher
5482045c22
Add reaction limit to instance serializer 2023-05-09 22:55:28 +02:00
fef
a97b0fd62b
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-09 22:55:28 +02:00
fef
9ac20598db
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-09 22:55:28 +02:00
fef
c53ff0fecc
cleanup JS imports and other minor stuff 2023-05-09 22:55:26 +02:00
fef
c898de9aba
remove unnecessary parameter 2023-05-09 22:55:14 +02:00
fef
ef5396ce65
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-09 22:55:12 +02:00
fef
99f03f2d1c
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-09 22:54:35 +02:00
fef
9702fa0a99
remove outdated comments 2023-05-09 22:54:35 +02:00
fef
c32386f15a
clean up new imports in vanilla flavour 2023-05-09 22:54:35 +02:00
fef
5aa74e9aae
rebase with upstream 2023-05-09 22:54:35 +02:00
fef
5d5fd9457d
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-09 22:54:33 +02:00
fef
4d7340472b
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-09 22:53:50 +02:00
fef
fdb5d35c7c
change default reaction limit to 1 2023-05-09 22:53:23 +02:00
fef
fbace10f99
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-09 22:53:23 +02:00
fef
2e312d28e8
fix reaction margins and paddings 2023-05-09 22:53:23 +02:00
fef
46179ed6be
cleanup frontend emoji reaction code 2023-05-09 22:53:23 +02:00
fef
42490e21f8
cleanup backend emoji reaction code 2023-05-09 22:53:23 +02:00
fef
4653f9830d
fix padding for reaction button 2023-05-09 22:53:23 +02:00
fef
abd60c57f7
handle misskey reactions properly
misskey federates emoji reactions as likes.
2023-05-09 22:53:23 +02:00
fef
2ec91c6d0f
move react button to action bar 2023-05-09 22:53:23 +02:00
fef
c5befd7c1a
cherry-pick emoji reaction changes 2023-05-09 22:53:21 +02:00
fef
dd4762f3ca
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-09 22:51:38 +02:00
fef
e210fccb9d
make status reaction count limit configurable 2023-05-09 22:51:38 +02:00
fef
ad6b92df8d
remove accidentally created file 2023-05-09 22:51:38 +02:00
fef
add68d9291
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-09 22:51:38 +02:00
fef
6eeda52a8e
show reactions in detailed status view 2023-05-09 22:51:38 +02:00
fef
a445e38694
add frontend for emoji reactions
this is still pretty bare bones but hey, it works.
2023-05-09 22:51:38 +02:00
fef
4829f96113
add backend support for status emoji reactions
turns out we can just reuse the code for
announcement reactions.
2023-05-09 22:51:34 +02:00
Claire
f08f6d20e6
Merge pull request #2215 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
2023-05-09 14:47:11 +02:00
Renaud Chaput
ea04f33f50 [Glitch] Fixes build errors from some previous TS-related commits
Port 45579a26cf to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-08 22:15:00 +02:00
fusagiko / takayamaki
3d9e35375c [Glitch] Rewrite actions/app.ts and reducers/missed_updates.ts with createAction
Port 0999cb4601 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-08 22:15:00 +02:00
Renaud Chaput
a33d6c946a [Glitch] Remove MastodonMap TS type
Port 9a52a7f7a0 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-08 22:15:00 +02:00
fusagiko / takayamaki
e8243d5bbd [Glitch] Add type annotation for some js files
Port e38b391940 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-08 22:15:00 +02:00
Claire
5f0d2b6e3b Copy Typescript type definitions to glitch-soc 2023-05-08 22:15:00 +02:00
Claire
f3af434c25 [Glitch] Fix incorrect import of redux store
Port 9c1929efad to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-08 22:15:00 +02:00
fusagiko / takayamaki
f4e3e309b1 [Glitch] use configureStore of redux-toolkit instead of createStore of redux
Port 8227af8dcc to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2023-05-08 22:15:00 +02:00