diff --git a/server/channels/app/notify_admin.go b/server/channels/app/notify_admin.go index 908134b4b2..87a294c55f 100644 --- a/server/channels/app/notify_admin.go +++ b/server/channels/app/notify_admin.go @@ -48,12 +48,12 @@ func (a *App) SaveAdminNotification(userId string, notifyData *model.NotifyAdmin func (a *App) DoCheckForAdminNotifications(trial bool) *model.AppError { ctx := request.EmptyContext(a.Srv().Log()) + currentSKU := "starter" license := a.Srv().License() - if license == nil { - return model.NewAppError("DoCheckForAdminNotifications", "app.notify_admin.send_notification_post.app_error", nil, "No license found", http.StatusInternalServerError) + if license != nil { + currentSKU = license.SkuShortName } - currentSKU := license.SkuShortName workspaceName := "" return a.SendNotifyAdminPosts(ctx, workspaceName, currentSKU, trial) diff --git a/server/channels/jobs/notify_admin/install_plugin_scheduler.go b/server/channels/jobs/notify_admin/install_plugin_scheduler.go index 36b9818635..91ebdb79c1 100644 --- a/server/channels/jobs/notify_admin/install_plugin_scheduler.go +++ b/server/channels/jobs/notify_admin/install_plugin_scheduler.go @@ -12,7 +12,7 @@ import ( "github.com/mattermost/mattermost-server/v6/server/platform/shared/mlog" ) -const installPluginSchedFreq = 1 * time.Minute +const installPluginSchedFreq = 24 * time.Hour func MakeInstallPluginScheduler(jobServer *jobs.JobServer, license *model.License, jobType string) model.Scheduler { isEnabled := func(cfg *model.Config) bool {