MM-54275 : Add Giphy production key to LDFlags (#24397)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2c6179a0a6
Коммит
66e5d5fffa
@@ -111,7 +111,6 @@ const (
|
||||
ServiceSettingsDefaultListenAndAddress = ":8065"
|
||||
ServiceSettingsDefaultGfycatAPIKey = "2_KtH_W5"
|
||||
ServiceSettingsDefaultGfycatAPISecret = "3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof"
|
||||
ServiceSettingsDefaultGiphySdkKey = "yaRojIWaxmKhtSMBaT3uLCAHm0kpMLKw"
|
||||
ServiceSettingsDefaultGiphySdkKeyTest = "s0glxvzVg9azvPipKxcPLpXV0q1x1fVP"
|
||||
ServiceSettingsDefaultDeveloperFlags = ""
|
||||
|
||||
@@ -400,6 +399,8 @@ type ServiceSettings struct {
|
||||
AllowSyncedDrafts *bool `access:"site_posts"`
|
||||
}
|
||||
|
||||
var MattermostGiphySdkKey string
|
||||
|
||||
func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
if s.EnableEmailInvitations == nil {
|
||||
// If the site URL is also not present then assume this is a clean install
|
||||
@@ -743,13 +744,8 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
s.GfycatAPISecret = NewString(ServiceSettingsDefaultGfycatAPISecret)
|
||||
}
|
||||
|
||||
if s.GiphySdkKey == nil {
|
||||
switch GetServiceEnvironment() {
|
||||
case ServiceEnvironmentProduction:
|
||||
s.GiphySdkKey = NewString(ServiceSettingsDefaultGiphySdkKey)
|
||||
case ServiceEnvironmentTest, ServiceEnvironmentDev:
|
||||
s.GiphySdkKey = NewString(ServiceSettingsDefaultGiphySdkKeyTest)
|
||||
}
|
||||
if s.GiphySdkKey == nil || *s.GiphySdkKey == "" {
|
||||
s.GiphySdkKey = NewString("")
|
||||
}
|
||||
|
||||
if s.ExperimentalEnableAuthenticationTransfer == nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user