Merge pull request #17011 from gouqi11/fixNotifyContact

fix(notify): fix notify webconsole
This commit is contained in:
Zexi Li
2023-05-11 16:17:57 +08:00
committed by GitHub
+4
View File
@@ -517,6 +517,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
}
@@ -537,6 +540,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,