summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/config.go2
-rw-r--r--utils/diagnostic.go19
2 files changed, 11 insertions, 10 deletions
diff --git a/utils/config.go b/utils/config.go
index 44ee14a6e..2c6f30bf0 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -150,6 +150,8 @@ func LoadConfig(fileName string) {
CfgFileName = fileName
}
+ config.SetDefaults()
+
if err := config.IsValid(); err != nil {
panic("Error validating config file=" + fileName + ", err=" + err.Message)
}
diff --git a/utils/diagnostic.go b/utils/diagnostic.go
index da02e771b..8572c2f51 100644
--- a/utils/diagnostic.go
+++ b/utils/diagnostic.go
@@ -6,24 +6,23 @@ package utils
import (
"net/http"
"net/url"
-
- "github.com/mattermost/platform/model"
)
const (
DIAGNOSTIC_URL = "https://d7zmvsa9e04kk.cloudfront.net"
- PROP_DIAGNOSTIC_ID = "id"
- PROP_DIAGNOSTIC_CATEGORY = "c"
- VAL_DIAGNOSTIC_CATEGORY_DEFAULT = "d"
- PROP_DIAGNOSTIC_BUILD = "b"
- PROP_DIAGNOSTIC_DATABASE = "db"
- PROP_DIAGNOSTIC_OS = "os"
- PROP_DIAGNOSTIC_USER_COUNT = "uc"
+ PROP_DIAGNOSTIC_ID = "id"
+ PROP_DIAGNOSTIC_CATEGORY = "c"
+ VAL_DIAGNOSTIC_CATEGORY_DEFAULT = "d"
+ PROP_DIAGNOSTIC_BUILD = "b"
+ PROP_DIAGNOSTIC_DATABASE = "db"
+ PROP_DIAGNOSTIC_OS = "os"
+ PROP_DIAGNOSTIC_USER_COUNT = "uc"
+ PROP_DIAGNOSTIC_ACTIVE_USER_COUNT = "auc"
)
func SendDiagnostic(values url.Values) {
- if Cfg.PrivacySettings.EnableSecurityFixAlert && model.IsOfficalBuild() {
+ if *Cfg.ServiceSettings.EnableSecurityFixAlert {
res, err := http.Get(DIAGNOSTIC_URL + "/i?" + values.Encode())
if err != nil {