mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix(notify): drop event notification default receiver
This commit is contained in:
@@ -220,7 +220,6 @@ func (nm *SNotificationManager) PerformEventNotify(ctx context.Context, userCred
|
||||
return output, errors.Wrap(err, "unable to get receive")
|
||||
}
|
||||
receiverIds = append(receiverIds, receiverIds1...)
|
||||
|
||||
// robot
|
||||
var robots []string
|
||||
_robots, err := SubscriberManager.robot(topic.Id, input.ProjectDomainId, input.ProjectId)
|
||||
@@ -252,7 +251,9 @@ func (nm *SNotificationManager) PerformEventNotify(ctx context.Context, userCred
|
||||
message := jsonutils.Marshal(input.ResourceDetails).String()
|
||||
|
||||
// append default receiver
|
||||
receiverIds = append(receiverIds, input.ReceiverIds...)
|
||||
if len(input.Event) == 0 {
|
||||
receiverIds = append(receiverIds, input.ReceiverIds...)
|
||||
}
|
||||
// fillter non-existed receiver
|
||||
receivers, err := ReceiverManager.FetchByIdOrNames(ctx, receiverIds...)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user