mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user