[MM-19344] add option to render latex (#12907)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
c0186cef1a
Коммит
f58e2ffd0f
@@ -300,6 +300,7 @@ func (a *App) trackConfig() {
|
||||
"disable_bots_when_owner_is_deactivated": *cfg.ServiceSettings.DisableBotsWhenOwnerIsDeactivated,
|
||||
"enable_bot_account_creation": *cfg.ServiceSettings.EnableBotAccountCreation,
|
||||
"enable_svgs": *cfg.ServiceSettings.EnableSVGs,
|
||||
"enable_latex": *cfg.ServiceSettings.EnableLatex,
|
||||
})
|
||||
|
||||
a.SendDiagnostic(TRACK_CONFIG_TEAM, map[string]interface{}{
|
||||
|
||||
@@ -44,6 +44,7 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L
|
||||
props["ExperimentalGroupUnreadChannels"] = *c.ServiceSettings.ExperimentalGroupUnreadChannels
|
||||
props["EnableSVGs"] = strconv.FormatBool(*c.ServiceSettings.EnableSVGs)
|
||||
props["EnableMarketplace"] = strconv.FormatBool(*c.PluginSettings.EnableMarketplace)
|
||||
props["EnableLatex"] = strconv.FormatBool(*c.ServiceSettings.EnableLatex)
|
||||
|
||||
// This setting is only temporary, so keep using the old setting name for the mobile and web apps
|
||||
props["ExperimentalEnablePostMetadata"] = "true"
|
||||
|
||||
@@ -325,6 +325,7 @@ type ServiceSettings struct {
|
||||
DisableBotsWhenOwnerIsDeactivated *bool `restricted:"true"`
|
||||
EnableBotAccountCreation *bool
|
||||
EnableSVGs *bool
|
||||
EnableLatex *bool
|
||||
}
|
||||
|
||||
func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
@@ -689,6 +690,14 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
s.EnableSVGs = NewBool(false)
|
||||
}
|
||||
}
|
||||
|
||||
if s.EnableLatex == nil {
|
||||
if isUpdate {
|
||||
s.EnableLatex = NewBool(true)
|
||||
} else {
|
||||
s.EnableLatex = NewBool(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type ClusterSettings struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user