GH-27059: Rewrite error messages about msg length (#29252)
Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f1d5884532
Коммит
8b86e1276e
@@ -437,7 +437,8 @@ func (o *Post) IsValid(maxPostSize int) *AppError {
|
||||
}
|
||||
|
||||
if utf8.RuneCountInString(o.Message) > maxPostSize {
|
||||
return NewAppError("Post.IsValid", "model.post.is_valid.msg.app_error", nil, "id="+o.Id, http.StatusBadRequest)
|
||||
return NewAppError("Post.IsValid", "model.post.is_valid.message_length.app_error",
|
||||
map[string]any{"Length": utf8.RuneCountInString(o.Message), "MaxLength": maxPostSize}, "id="+o.Id, http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if utf8.RuneCountInString(o.Hashtags) > PostHashtagsMaxRunes {
|
||||
|
||||
Ссылка в новой задаче
Block a user