Merge branch 'master' into plugins-2
Этот коммит содержится в:
@@ -87,6 +87,8 @@ const (
|
||||
SERVICE_SETTINGS_DEFAULT_MAX_LOGIN_ATTEMPTS = 10
|
||||
SERVICE_SETTINGS_DEFAULT_ALLOW_CORS_FROM = ""
|
||||
SERVICE_SETTINGS_DEFAULT_LISTEN_AND_ADDRESS = ":8065"
|
||||
SERVICE_SETTINGS_DEFAULT_GFYCAT_API_KEY = "2_KtH_W5"
|
||||
SERVICE_SETTINGS_DEFAULT_GFYCAT_API_SECRET = "3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof"
|
||||
|
||||
TEAM_SETTINGS_DEFAULT_MAX_USERS_PER_TEAM = 50
|
||||
TEAM_SETTINGS_DEFAULT_CUSTOM_BRAND_TEXT = ""
|
||||
@@ -417,15 +419,15 @@ func (s *ServiceSettings) SetDefaults() {
|
||||
}
|
||||
|
||||
if s.EnableGifPicker == nil {
|
||||
s.EnableGifPicker = NewBool(true)
|
||||
s.EnableGifPicker = NewBool(false)
|
||||
}
|
||||
|
||||
if s.GfycatApiKey == nil {
|
||||
s.GfycatApiKey = NewString("")
|
||||
if s.GfycatApiKey == nil || *s.GfycatApiKey == "" {
|
||||
s.GfycatApiKey = NewString(SERVICE_SETTINGS_DEFAULT_GFYCAT_API_KEY)
|
||||
}
|
||||
|
||||
if s.GfycatApiSecret == nil {
|
||||
s.GfycatApiSecret = NewString("")
|
||||
if s.GfycatApiSecret == nil || *s.GfycatApiSecret == "" {
|
||||
s.GfycatApiSecret = NewString(SERVICE_SETTINGS_DEFAULT_GFYCAT_API_SECRET)
|
||||
}
|
||||
|
||||
if s.RestrictCustomEmojiCreation == nil {
|
||||
@@ -772,8 +774,8 @@ func (s *FileSettings) SetDefaults() {
|
||||
}
|
||||
|
||||
if s.InitialFont == "" {
|
||||
// Defaults to "luximbi.ttf"
|
||||
s.InitialFont = "luximbi.ttf"
|
||||
// Defaults to "nunito-bold.ttf"
|
||||
s.InitialFont = "nunito-bold.ttf"
|
||||
}
|
||||
|
||||
if s.Directory == "" {
|
||||
|
||||
@@ -41,11 +41,15 @@ func (emoji *Emoji) IsValid() *AppError {
|
||||
return NewAppError("Emoji.IsValid", "model.emoji.update_at.app_error", nil, "id="+emoji.Id, http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if len(emoji.CreatorId) != 26 {
|
||||
if len(emoji.CreatorId) > 26 {
|
||||
return NewAppError("Emoji.IsValid", "model.emoji.user_id.app_error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
if len(emoji.Name) == 0 || len(emoji.Name) > EMOJI_NAME_MAX_LENGTH || !IsValidAlphaNumHyphenUnderscore(emoji.Name, false) || inSystemEmoji(emoji.Name) {
|
||||
return IsValidEmojiName(emoji.Name)
|
||||
}
|
||||
|
||||
func IsValidEmojiName(name string) *AppError {
|
||||
if len(name) == 0 || len(name) > EMOJI_NAME_MAX_LENGTH || !IsValidAlphaNumHyphenUnderscore(name, false) || inSystemEmoji(name) {
|
||||
return NewAppError("Emoji.IsValid", "model.emoji.name.app_error", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
|
||||
@@ -40,11 +40,6 @@ func TestEmojiIsValid(t *testing.T) {
|
||||
}
|
||||
|
||||
emoji.UpdateAt = 1234
|
||||
emoji.CreatorId = strings.Repeat("1", 25)
|
||||
if err := emoji.IsValid(); err == nil {
|
||||
t.Fatal()
|
||||
}
|
||||
|
||||
emoji.CreatorId = strings.Repeat("1", 27)
|
||||
if err := emoji.IsValid(); err == nil {
|
||||
t.Fatal()
|
||||
|
||||
@@ -21,6 +21,7 @@ type MessageExport struct {
|
||||
PostCreateAt *int64
|
||||
PostMessage *string
|
||||
PostType *string
|
||||
PostRootId *string
|
||||
PostOriginalId *string
|
||||
PostFileIds StringArray
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
// It should be maintained in chronological order with most current
|
||||
// release at the front of the list.
|
||||
var versions = []string{
|
||||
"5.1.0",
|
||||
"5.0.0",
|
||||
"4.10.0",
|
||||
"4.9.0",
|
||||
|
||||
Ссылка в новой задаче
Block a user