fix(notify): fix notify webconsole

This commit is contained in:
马鸿飞
2023-05-10 20:29:28 +08:00
parent 89956b8c2e
commit 518bc0ac3a
+4
View File
@@ -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,