diff --git a/pkg/apis/notify/notification.go b/pkg/apis/notify/notification.go index ac1b6f5230..be3a894717 100644 --- a/pkg/apis/notify/notification.go +++ b/pkg/apis/notify/notification.go @@ -102,6 +102,8 @@ type NotificationManagerEventNotifyInput struct { // description: direct contact, admin privileges required // required: false Contacts []SContact `json:"contacts"` + // 消息机器人列表 + RobotIds []string `json:"robot_ids"` // description: contact types // required: false // example: email diff --git a/pkg/notify/models/notification.go b/pkg/notify/models/notification.go index 143f5a668f..53fe246020 100644 --- a/pkg/notify/models/notification.go +++ b/pkg/notify/models/notification.go @@ -234,6 +234,9 @@ func (nm *SNotificationManager) PerformEventNotify(ctx context.Context, userCred robots[robot] = groupTime } } + for _, id := range input.RobotIds { + robots[id] = 0 + } var webhookRobots []string realRobot := make(map[string]uint32)