[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>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0a38042d58
Коммит
eaa5cce3ce
@@ -29,18 +29,20 @@ func TestReactionsOfPost(t *testing.T) {
|
||||
reactionObject := model.Reaction{
|
||||
UserId: th.BasicUser.Id,
|
||||
PostId: post.Id,
|
||||
EmojiName: "emoji",
|
||||
EmojiName: "smile",
|
||||
CreateAt: model.GetMillis(),
|
||||
}
|
||||
reactionObjectDeleted := model.Reaction{
|
||||
UserId: th.BasicUser2.Id,
|
||||
PostId: post.Id,
|
||||
EmojiName: "emoji",
|
||||
EmojiName: "smile",
|
||||
CreateAt: model.GetMillis(),
|
||||
}
|
||||
|
||||
th.App.SaveReactionForPost(th.Context, &reactionObject)
|
||||
th.App.SaveReactionForPost(th.Context, &reactionObjectDeleted)
|
||||
_, err := th.App.SaveReactionForPost(th.Context, &reactionObject)
|
||||
require.Nil(t, err)
|
||||
_, err = th.App.SaveReactionForPost(th.Context, &reactionObjectDeleted)
|
||||
require.Nil(t, err)
|
||||
reactionsOfPost, err := th.App.BuildPostReactions(th.Context, post.Id)
|
||||
require.Nil(t, err)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user