Added Inline Latex support (#18219)

* Added inline latex option to config

* Inline latex setting now defaults to true

* Added inline latex setting to telemetry

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
KobeBergmans
2021-08-30 17:52:33 +02:00
committed by GitHub
parent a6629129ea
commit 71a811e993
3 changed files with 7 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
props["EnableSVGs"] = strconv.FormatBool(*c.ServiceSettings.EnableSVGs)
props["EnableMarketplace"] = strconv.FormatBool(*c.PluginSettings.EnableMarketplace)
props["EnableLatex"] = strconv.FormatBool(*c.ServiceSettings.EnableLatex)
props["EnableInlineLatex"] = strconv.FormatBool(*c.ServiceSettings.EnableInlineLatex)
props["ExtendSessionLengthWithActivity"] = strconv.FormatBool(*c.ServiceSettings.ExtendSessionLengthWithActivity)
props["ManagedResourcePaths"] = *c.ServiceSettings.ManagedResourcePaths

View File

@@ -366,6 +366,7 @@ type ServiceSettings struct {
EnableBotAccountCreation *bool `access:"integrations_bot_accounts"`
EnableSVGs *bool `access:"site_posts"`
EnableLatex *bool `access:"site_posts"`
EnableInlineLatex *bool `access:"site_posts"`
EnableAPIChannelDeletion *bool
EnableLocalMode *bool
LocalModeSocketLocation *string // telemetry: none
@@ -792,6 +793,10 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
}
}
if s.EnableInlineLatex == nil {
s.EnableInlineLatex = NewBool(true)
}
if s.EnableLocalMode == nil {
s.EnableLocalMode = NewBool(false)
}

View File

@@ -436,6 +436,7 @@ func (ts *TelemetryService) trackConfig() {
"enable_bot_account_creation": *cfg.ServiceSettings.EnableBotAccountCreation,
"enable_svgs": *cfg.ServiceSettings.EnableSVGs,
"enable_latex": *cfg.ServiceSettings.EnableLatex,
"enable_inline_latex": *cfg.ServiceSettings.EnableInlineLatex,
"enable_opentracing": *cfg.ServiceSettings.EnableOpenTracing,
"enable_local_mode": *cfg.ServiceSettings.EnableLocalMode,
"managed_resource_paths": isDefault(*cfg.ServiceSettings.ManagedResourcePaths, ""),