From 96629e284f4bae9560b52d295c179f33781e71bd Mon Sep 17 00:00:00 2001 From: ning <710leo@gmail.com> Date: Thu, 17 Jul 2025 11:45:58 +0800 Subject: [PATCH] refactor: add email notify record --- memsto/notify_channel_cache.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/memsto/notify_channel_cache.go b/memsto/notify_channel_cache.go index bf9eb0db..c2c09b19 100644 --- a/memsto/notify_channel_cache.go +++ b/memsto/notify_channel_cache.go @@ -502,7 +502,11 @@ func (ncc *NotifyChannelCacheType) startEmailSender(chID int64, smtp *models.SMT 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++ if size >= conf.Batch {