Don't email licensed/internal customers about Cloud Renewals (#26268)

This commit is contained in:
Nick Misasi 2024-02-26 10:07:48 -05:00 committed by GitHub
parent 1c0dcda801
commit a85ebd3f49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -271,6 +271,10 @@ func (a *App) DoSubscriptionRenewalCheck() {
return // Don't send renewal emails for free trials return // Don't send renewal emails for free trials
} }
if model.BillingType(subscription.BillingType) == model.BillingTypeLicensed || model.BillingType(subscription.BillingType) == model.BillingTypeInternal {
return // Don't send renewal emails for licensed or internal billing
}
sysVar, err := a.Srv().Store().System().GetByName(model.CloudRenewalEmail) sysVar, err := a.Srv().Store().System().GetByName(model.CloudRenewalEmail)
if err != nil { if err != nil {
// We only care about the error if it wasn't a not found error // We only care about the error if it wasn't a not found error

View File

@ -30,6 +30,13 @@ const (
BillingSchemeSalesServe = BillingScheme("sales_serve") BillingSchemeSalesServe = BillingScheme("sales_serve")
) )
type BillingType string
const (
BillingTypeLicensed = BillingType("licensed")
BillingTypeInternal = BillingType("internal")
)
type RecurringInterval string type RecurringInterval string
const ( const (