From c6716e030c02f316b887c1d3ee4b443aa3ab6afd Mon Sep 17 00:00:00 2001 From: Wim Date: Fri, 1 Apr 2022 00:23:19 +0200 Subject: Update dependencies (#1784) --- vendor/github.com/mattermost/mattermost-server/v6/model/emoji.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model/emoji.go') diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/emoji.go b/vendor/github.com/mattermost/mattermost-server/v6/model/emoji.go index fd0e8ab3..4b30ee43 100644 --- a/vendor/github.com/mattermost/mattermost-server/v6/model/emoji.go +++ b/vendor/github.com/mattermost/mattermost-server/v6/model/emoji.go @@ -78,9 +78,12 @@ func (emoji *Emoji) IsValid() *AppError { } func IsValidEmojiName(name string) *AppError { - if name == "" || len(name) > EmojiNameMaxLength || !IsValidAlphaNumHyphenUnderscorePlus(name) || inSystemEmoji(name) { + if name == "" || len(name) > EmojiNameMaxLength || !IsValidAlphaNumHyphenUnderscorePlus(name) { return NewAppError("Emoji.IsValid", "model.emoji.name.app_error", nil, "", http.StatusBadRequest) } + if inSystemEmoji(name) { + return NewAppError("Emoji.IsValid", "model.emoji.system_emoji_name.app_error", nil, "", http.StatusBadRequest) + } return nil } -- cgit v1.2.3