refactor: add email notify record
This commit is contained in:
parent
67d2875690
commit
96629e284f
|
@ -502,7 +502,11 @@ func (ncc *NotifyChannelCacheType) startEmailSender(chID int64, smtp *models.SMT
|
||||||
m.Mail.GetHeader("Subject"), m.Mail.GetHeader("To"))
|
m.Mail.GetHeader("Subject"), m.Mail.GetHeader("To"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// sender.NotifyRecord(ncc.ctx, m.Events, m.NotifyRuleId, models.Email, strings.Join(m.Mail.GetHeader("To"), ","), "", err)
|
// 记录通知详情
|
||||||
|
if ncc.notifyRecordFunc != nil {
|
||||||
|
target := strings.Join(m.Mail.GetHeader("To"), ",")
|
||||||
|
ncc.notifyRecordFunc(ncc.ctx, m.Events, m.NotifyRuleId, "Email", target, "success", err)
|
||||||
|
}
|
||||||
size++
|
size++
|
||||||
|
|
||||||
if size >= conf.Batch {
|
if size >= conf.Batch {
|
||||||
|
|
Loading…
Reference in New Issue