From 518bc0ac3a54f68b8989ffb98e5dd2070da0c87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E9=B8=BF=E9=A3=9E?= Date: Wed, 10 May 2023 20:29:28 +0800 Subject: [PATCH] fix(notify): fix notify webconsole --- pkg/notify/models/receiver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/notify/models/receiver.go b/pkg/notify/models/receiver.go index 572a99d5cd..71d3a873e8 100644 --- a/pkg/notify/models/receiver.go +++ b/pkg/notify/models/receiver.go @@ -516,6 +516,9 @@ func (rm *SReceiverManager) PerformGetTypes(ctx context.Context, userCred mcclie for i := range ret { ret[i] = allTypes[i].Type } + if !utils.IsInStringArray(api.WEBCONSOLE, ret) { + ret = append(ret, api.WEBCONSOLE) + } output.Types = ret return output, nil } @@ -536,6 +539,7 @@ func (rm *SReceiverManager) FetchCustomizeColumns(ctx context.Context, userCred if user.EnabledMobile.Bool() { rows[i].EnabledContactTypes = append(rows[i].EnabledContactTypes, api.MOBILE) } + rows[i].EnabledContactTypes = append(rows[i].EnabledContactTypes, api.WEBCONSOLE) rows[i].VerifiedInfos = []api.VerifiedInfo{ { ContactType: api.EMAIL,