Gfycat integration (#8971)
* Gfycat integration * Added gfycat api credentials to config.
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
9abd74c5e3
Коммит
437f9f5b64
@@ -44,6 +44,9 @@
|
|||||||
"WebserverMode": "gzip",
|
"WebserverMode": "gzip",
|
||||||
"EnableCustomEmoji": false,
|
"EnableCustomEmoji": false,
|
||||||
"EnableEmojiPicker": true,
|
"EnableEmojiPicker": true,
|
||||||
|
"EnableGifPicker": true,
|
||||||
|
"GfycatApiKey": "",
|
||||||
|
"GfycatApiSecret": "",
|
||||||
"RestrictCustomEmojiCreation": "all",
|
"RestrictCustomEmojiCreation": "all",
|
||||||
"RestrictPostDelete": "all",
|
"RestrictPostDelete": "all",
|
||||||
"AllowEditPost": "always",
|
"AllowEditPost": "always",
|
||||||
|
|||||||
@@ -210,6 +210,9 @@ type ServiceSettings struct {
|
|||||||
WebserverMode *string
|
WebserverMode *string
|
||||||
EnableCustomEmoji *bool
|
EnableCustomEmoji *bool
|
||||||
EnableEmojiPicker *bool
|
EnableEmojiPicker *bool
|
||||||
|
EnableGifPicker *bool
|
||||||
|
GfycatApiKey *string
|
||||||
|
GfycatApiSecret *string
|
||||||
RestrictCustomEmojiCreation *string
|
RestrictCustomEmojiCreation *string
|
||||||
RestrictPostDelete *string
|
RestrictPostDelete *string
|
||||||
AllowEditPost *string
|
AllowEditPost *string
|
||||||
@@ -413,6 +416,18 @@ func (s *ServiceSettings) SetDefaults() {
|
|||||||
s.EnableEmojiPicker = NewBool(true)
|
s.EnableEmojiPicker = NewBool(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.EnableGifPicker == nil {
|
||||||
|
s.EnableGifPicker = NewBool(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
if s.GfycatApiKey == nil {
|
||||||
|
s.GfycatApiKey = NewString("")
|
||||||
|
}
|
||||||
|
|
||||||
|
if s.GfycatApiSecret == nil {
|
||||||
|
s.GfycatApiSecret = NewString("")
|
||||||
|
}
|
||||||
|
|
||||||
if s.RestrictCustomEmojiCreation == nil {
|
if s.RestrictCustomEmojiCreation == nil {
|
||||||
s.RestrictCustomEmojiCreation = NewString(RESTRICT_EMOJI_CREATION_ALL)
|
s.RestrictCustomEmojiCreation = NewString(RESTRICT_EMOJI_CREATION_ALL)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -555,6 +555,9 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L
|
|||||||
props["SQLDriverName"] = *c.SqlSettings.DriverName
|
props["SQLDriverName"] = *c.SqlSettings.DriverName
|
||||||
|
|
||||||
props["EnableEmojiPicker"] = strconv.FormatBool(*c.ServiceSettings.EnableEmojiPicker)
|
props["EnableEmojiPicker"] = strconv.FormatBool(*c.ServiceSettings.EnableEmojiPicker)
|
||||||
|
props["EnableGifPicker"] = strconv.FormatBool(*c.ServiceSettings.EnableGifPicker)
|
||||||
|
props["GfycatApiKey"] = *c.ServiceSettings.GfycatApiKey
|
||||||
|
props["GfycatApiSecret"] = *c.ServiceSettings.GfycatApiSecret
|
||||||
props["RestrictCustomEmojiCreation"] = *c.ServiceSettings.RestrictCustomEmojiCreation
|
props["RestrictCustomEmojiCreation"] = *c.ServiceSettings.RestrictCustomEmojiCreation
|
||||||
props["MaxFileSize"] = strconv.FormatInt(*c.FileSettings.MaxFileSize, 10)
|
props["MaxFileSize"] = strconv.FormatInt(*c.FileSettings.MaxFileSize, 10)
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user