[MM-55143] Disallow reacting with an emoji that does not exist, limit the total number of unique reactions per post (#25331)

* [MM-55143] Disallow reacting with an emoji that does not exist

* WIP for server limit on emoji reactions

* WIP

* Implement default limit of 25 unique emoji reactions

* Add modal for reaction limit

* Fix test

* PR feedback

* Fix i18n

* Update admin string

* Merge'd

* Fixing some issues, check limits correctly based on other users reactions

* Fix typos

* Fix lint/test

* Add tests, fix other tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Devin Binnie
2023-11-27 09:11:04 -05:00
committed by GitHub
parent 0a38042d58
commit eaa5cce3ce
24 changed files with 652 additions and 29 deletions

View File

@@ -55,7 +55,7 @@ func TestSaveReaction(t *testing.T) {
})
t.Run("save-second-reaction", func(t *testing.T) {
reaction.EmojiName = "sad"
reaction.EmojiName = "cry"
rr, _, err := client.SaveReaction(context.Background(), reaction)
require.NoError(t, err)
@@ -290,7 +290,7 @@ func TestDeleteReaction(t *testing.T) {
r2 := &model.Reaction{
UserId: userId,
PostId: postId,
EmojiName: "smile-",
EmojiName: "cry",
}
r3 := &model.Reaction{
@@ -302,7 +302,7 @@ func TestDeleteReaction(t *testing.T) {
r4 := &model.Reaction{
UserId: user2Id,
PostId: postId,
EmojiName: "smile_",
EmojiName: "grin",
}
// Check the appropriate permissions are enforced.