Merge pull request #9613 from rainzm/notify/webconsole

fix(notify): fit correctly when send notification via contact
This commit is contained in:
Zexi Li
2020-12-23 22:03:24 +08:00
committed by GitHub
+1 -1
View File
@@ -78,7 +78,7 @@ const (
func (nm *SNotificationManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input api.NotificationCreateInput) (api.NotificationCreateInput, error) {
// compatible
if len(input.Receivers) == 0 && input.ContactType == api.WEBCONSOLE {
if len(input.Receivers) != 0 && input.ContactType == api.WEBCONSOLE {
input.Contacts = input.Receivers
input.Receivers = []string{}
}