From 2b3d2b4dec781bac6f1b5989c89f8244ca0e17f0 Mon Sep 17 00:00:00 2001 From: rainzm Date: Fri, 24 Dec 2021 18:52:23 +0800 Subject: [PATCH] fix(notify): real delete for email and mobile --- pkg/notify/tasks/repull_subcontact_task.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/notify/tasks/repull_subcontact_task.go b/pkg/notify/tasks/repull_subcontact_task.go index 6e4edfea02..f0e66dfe7f 100644 --- a/pkg/notify/tasks/repull_subcontact_task.go +++ b/pkg/notify/tasks/repull_subcontact_task.go @@ -59,6 +59,9 @@ func (s repullFailedReason) String() string { func (self *RepullSuncontactTask) OnInit(ctx context.Context, obj db.IStandaloneModel, body jsonutils.JSONObject) { config := obj.(*models.SConfig) if !utils.IsInStringArray(config.Type, PullContactType) { + if del, _ := self.GetParams().Bool("deleted"); del { + config.RealDelete(ctx, self.GetUserCred()) + } self.SetStageComplete(ctx, nil) return }