mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 02:37:24 +08:00
fix(notify): support notify with robotids (#22502)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user