fix(notify): support notify with robotids (#22502)

This commit is contained in:
屈轩
2025-05-09 21:23:03 +08:00
committed by GitHub
parent 4267f2ab29
commit 6290cb0daa
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -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
+3
View File
@@ -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)