summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/diagnostic.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/utils/diagnostic.go b/utils/diagnostic.go
index 9a61ae934..8ff2922f4 100644
--- a/utils/diagnostic.go
+++ b/utils/diagnostic.go
@@ -6,12 +6,12 @@ package utils
import (
"net/http"
- l4g "code.google.com/p/log4go"
-
"github.com/mattermost/platform/model"
)
const (
+ DIAGNOSTIC_URL = "https://d7zmvsa9e04kk.cloudfront.net"
+
PROP_DIAGNOSTIC_ID = "id"
PROP_DIAGNOSTIC_CATEGORY = "c"
VAL_DIAGNOSTIC_CATEGORY_DEFALUT = "d"
@@ -21,8 +21,8 @@ const (
PROP_DIAGNOSTIC_USER_COUNT = "uc"
)
-func SendDiagnostic(data model.StringMap) *model.AppError {
- if Cfg.PrivacySettings.EnableDiagnostic && !model.IsOfficalBuild() {
+func SendDiagnostic(data model.StringMap) {
+ if Cfg.PrivacySettings.EnableSecurityFixAlert && model.IsOfficalBuild() {
query := "?"
for name, value := range data {
@@ -33,13 +33,11 @@ func SendDiagnostic(data model.StringMap) *model.AppError {
query += name + "=" + UrlEncode(value)
}
- res, err := http.Get("http://d7zmvsa9e04kk.cloudfront.net/i" + query)
+ res, err := http.Get(DIAGNOSTIC_URL + "/i" + query)
if err != nil {
- l4g.Error("Failed to send diagnostics %v", err.Error())
+ return
}
res.Body.Close()
}
-
- return nil
}