[MM-32639] - Resend user invite emails (#17113)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ab5925c4de
Коммит
489eaa4605
18
api4/team.go
18
api4/team.go
@@ -1220,6 +1220,24 @@ func inviteUsersToTeam(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
emailList, invitesOverLimit, _ = c.App.GetErrorListForEmailsOverLimit(emailList, cloudUserLimit)
|
||||
}
|
||||
}
|
||||
|
||||
// we get the emailList after it has finished checks like the emails over the list
|
||||
|
||||
scheduledAt := model.GetMillis()
|
||||
jobData := map[string]string{
|
||||
"emailList": model.ArrayToJson(emailList),
|
||||
"teamID": c.Params.TeamId,
|
||||
"senderID": c.App.Session().UserId,
|
||||
"scheduledAt": strconv.FormatInt(scheduledAt, 10),
|
||||
}
|
||||
|
||||
// we then manually schedule the job
|
||||
_, e := c.App.Srv().Jobs.CreateJob(model.JOB_TYPE_RESEND_INVITATION_EMAIL, jobData)
|
||||
if e != nil {
|
||||
c.Err = model.NewAppError("Api4.inviteUsersToTeam", e.Id, nil, e.Error(), e.StatusCode)
|
||||
return
|
||||
}
|
||||
|
||||
var invitesWithError []*model.EmailInviteWithError
|
||||
var err *model.AppError
|
||||
if emailList != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user