summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorJason Blais <jason@spinpunch.com>2018-07-03 05:26:08 -0400
committerCarlos Tadeu Panato Junior <ctadeu@gmail.com>2018-07-03 11:26:08 +0200
commit8821fee6c270042dcd4346801ceb0e8d828ed733 (patch)
treedac1f2b1ff773e28cbba1e23569803e492d0245e /model/config.go
parent4ccb8b7cff7e23b8b3dc21b80b1317f2104307f7 (diff)
downloadchat-8821fee6c270042dcd4346801ceb0e8d828ed733.tar.gz
chat-8821fee6c270042dcd4346801ceb0e8d828ed733.tar.bz2
chat-8821fee6c270042dcd4346801ceb0e8d828ed733.zip
Disable Gfycat by default during Beta and move default keys to server (#9027)
* Update default.json * Update diagnostics.go * Added default Gfycat API credentials to server * Fixed default Gfycat credentials
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/model/config.go b/model/config.go
index e6bd04dfc..7b3a197b5 100644
--- a/model/config.go
+++ b/model/config.go
@@ -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 {