Improves notify props validation (#24031)

* Adds the channel member notify props max runes restriction

* Fix translations
Этот коммит содержится в:
Miguel de la Cruz
2023-07-18 17:25:11 +02:00
коммит произвёл GitHub
родитель 3c31629813
Коммит 4803889158
7 изменённых файлов: 97 добавлений и 16 удалений

Просмотреть файл

@@ -4,6 +4,7 @@
package model
import (
"strings"
"testing"
"github.com/stretchr/testify/require"
@@ -37,4 +38,7 @@ func TestChannelMemberIsValid(t *testing.T) {
o.Roles = ""
require.Nil(t, o.IsValid(), "should be invalid")
o.NotifyProps["property"] = strings.Repeat("Z", ChannelMemberNotifyPropsMaxRunes)
require.NotNil(t, o.IsValid(), "should be invalid")
}