From 71a811e993510a745e7dad267a2e8b41e0d5468f Mon Sep 17 00:00:00 2001 From: KobeBergmans <55985776+KobeBergmans@users.noreply.github.com> Date: Mon, 30 Aug 2021 17:52:33 +0200 Subject: [PATCH] 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 --- config/client.go | 1 + model/config.go | 5 +++++ services/telemetry/telemetry.go | 1 + 3 files changed, 7 insertions(+) diff --git a/config/client.go b/config/client.go index 9b9bdfd21a..bf80bb3f1e 100644 --- a/config/client.go +++ b/config/client.go @@ -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 diff --git a/model/config.go b/model/config.go index 2ec109f2c9..c7f070c325 100644 --- a/model/config.go +++ b/model/config.go @@ -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) } diff --git a/services/telemetry/telemetry.go b/services/telemetry/telemetry.go index d7069518af..4f95fb84dd 100644 --- a/services/telemetry/telemetry.go +++ b/services/telemetry/telemetry.go @@ -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, ""),