From 1ec295f88ca99e9423ffd91019cecf802ae3dc77 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 6 Feb 2018 17:25:49 -0600 Subject: add App.License, remove utils.IsLicensed / utils.License calls (#8203) --- app/notification.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/notification.go') 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 } -- cgit v1.2.3-1-g7c22