[MM-45053] - Remove 'trial of Mattermost ending soon' product emails (#20550)

* [MM-45053] - Remove 'trial of Mattermost ending soon' product emails

* remove trial end warning email
Этот коммит содержится в:
Allan Guwatudde
2022-06-30 09:18:13 +03:00
коммит произвёл GitHub
родитель 83b4e7285e
Коммит b445440600
14 изменённых файлов: 0 добавлений и 1425 удалений

Просмотреть файл

@@ -7,7 +7,6 @@ import (
"bytes"
"encoding/binary"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"time"
@@ -603,20 +602,6 @@ func handleCWSWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err = model.NewAppError("SendCloudWelcomeEmail", "api.user.send_cloud_welcome_email.error", nil, err.Error(), http.StatusInternalServerError)
return
}
case model.EventTypeTrialWillEnd:
endTimeStamp := event.SubscriptionTrialEndUnixTimeStamp
t := time.Unix(endTimeStamp, 0)
trialEndDate := fmt.Sprintf("%s %d, %d", t.Month(), t.Day(), t.Year())
if appErr := c.App.SendCloudTrialEndWarningEmail(trialEndDate, *c.App.Config().ServiceSettings.SiteURL); appErr != nil {
c.Err = appErr
return
}
case model.EventTypeTrialEnded:
if appErr := c.App.SendCloudTrialEndedEmail(); appErr != nil {
c.Err = appErr
return
}
case model.EventTypeSubscriptionChanged:
// event.ProductLimits is nil if there was no change
if event.ProductLimits != nil {