summaryrefslogtreecommitdiffstats
path: root/app/notification.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/notification.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/notification.go')
-rw-r--r--app/notification.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/notification.go b/app/notification.go
index 19f7894c5..1318308f8 100644
--- a/app/notification.go
+++ b/app/notification.go
@@ -233,7 +233,7 @@ func (a *App) SendNotifications(post *model.Post, team *model.Team, channel *mod
sendPushNotifications := false
if *a.Config().EmailSettings.SendPushNotifications {
pushServer := *a.Config().EmailSettings.PushNotificationServer
- if pushServer == model.MHPNS && (!utils.IsLicensed() || !*utils.License().Features.MHPNS) {
+ if license := a.License(); pushServer == model.MHPNS && (license == nil || !*license.Features.MHPNS) {
l4g.Warn(utils.T("api.post.send_notifications_and_forget.push_notification.mhpnsWarn"))
sendPushNotifications = false
} else {
@@ -358,7 +358,7 @@ func (a *App) sendNotificationEmail(post *model.Post, user *model.User, channel
}
emailNotificationContentsType := model.EMAIL_NOTIFICATION_CONTENTS_FULL
- if utils.IsLicensed() && *utils.License().Features.EmailNotificationContents {
+ if license := a.License(); license != nil && *license.Features.EmailNotificationContents {
emailNotificationContentsType = *a.Config().EmailSettings.EmailNotificationContentsType
}