summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/default.json3
-rw-r--r--model/config.go15
-rw-r--r--utils/config.go3
3 files changed, 21 insertions, 0 deletions
diff --git a/config/default.json b/config/default.json
index ac57fe5e4..2d1e6ceec 100644
--- a/config/default.json
+++ b/config/default.json
@@ -44,6 +44,9 @@
"WebserverMode": "gzip",
"EnableCustomEmoji": false,
"EnableEmojiPicker": true,
+ "EnableGifPicker": true,
+ "GfycatApiKey": "",
+ "GfycatApiSecret": "",
"RestrictCustomEmojiCreation": "all",
"RestrictPostDelete": "all",
"AllowEditPost": "always",
diff --git a/model/config.go b/model/config.go
index 868bb01d5..ce66f2f05 100644
--- a/model/config.go
+++ b/model/config.go
@@ -210,6 +210,9 @@ type ServiceSettings struct {
WebserverMode *string
EnableCustomEmoji *bool
EnableEmojiPicker *bool
+ EnableGifPicker *bool
+ GfycatApiKey *string
+ GfycatApiSecret *string
RestrictCustomEmojiCreation *string
RestrictPostDelete *string
AllowEditPost *string
@@ -413,6 +416,18 @@ func (s *ServiceSettings) SetDefaults() {
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 {
s.RestrictCustomEmojiCreation = NewString(RESTRICT_EMOJI_CREATION_ALL)
}
diff --git a/utils/config.go b/utils/config.go
index d3cdbd3ee..10661aa54 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -555,6 +555,9 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L
props["SQLDriverName"] = *c.SqlSettings.DriverName
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["MaxFileSize"] = strconv.FormatInt(*c.FileSettings.MaxFileSize, 10)