summaryrefslogtreecommitdiffstats
path: root/app/diagnostics.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-02-06 17:25:49 -0600
committerGitHub <noreply@github.com>2018-02-06 17:25:49 -0600
commit1ec295f88ca99e9423ffd91019cecf802ae3dc77 (patch)
tree05abc364fefdc6b1088bfb4a307ba11db0dc427f /app/diagnostics.go
parent034dbc07e3068c482e654b6a1a8fcbe4b01c44f3 (diff)
downloadchat-1ec295f88ca99e9423ffd91019cecf802ae3dc77.tar.gz
chat-1ec295f88ca99e9423ffd91019cecf802ae3dc77.tar.bz2
chat-1ec295f88ca99e9423ffd91019cecf802ae3dc77.zip
add App.License, remove utils.IsLicensed / utils.License calls (#8203)
Diffstat (limited to 'app/diagnostics.go')
-rw-r--r--app/diagnostics.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/app/diagnostics.go b/app/diagnostics.go
index c74224f19..809d9ff1e 100644
--- a/app/diagnostics.go
+++ b/app/diagnostics.go
@@ -11,7 +11,6 @@ import (
"sync/atomic"
"github.com/mattermost/mattermost-server/model"
- "github.com/mattermost/mattermost-server/utils"
"github.com/segmentio/analytics-go"
)
@@ -509,17 +508,17 @@ func (a *App) trackConfig() {
}
func (a *App) trackLicense() {
- if utils.IsLicensed() {
+ if license := a.License(); license != nil {
data := map[string]interface{}{
- "customer_id": utils.License().Customer.Id,
- "license_id": utils.License().Id,
- "issued": utils.License().IssuedAt,
- "start": utils.License().StartsAt,
- "expire": utils.License().ExpiresAt,
- "users": *utils.License().Features.Users,
+ "customer_id": license.Customer.Id,
+ "license_id": license.Id,
+ "issued": license.IssuedAt,
+ "start": license.StartsAt,
+ "expire": license.ExpiresAt,
+ "users": *license.Features.Users,
}
- features := utils.License().Features.ToMap()
+ features := license.Features.ToMap()
for featureName, featureValue := range features {
data["feature_"+featureName] = featureValue
}