Skip to content

Commit

Permalink
ContactChannels#LoadEscalationRecipientsChannel: Change param1 type
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Dec 21, 2023
1 parent 2b84d22 commit 82bff48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/eventhandler/eventhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (eh *EventHandler) RetriggerEscalations(ev *event.Event) {
return err
}

channels.LoadEscalationRecipientsChannel(escalation, eh.Incident, ev.Time)
channels.LoadEscalationRecipientsChannel(escalation.Recipients, eh.Incident, ev.Time)
}

notifications, err = eh.addPendingNotifications(ctx, tx, ev, types.Int{})
Expand Down
6 changes: 3 additions & 3 deletions internal/incident/incident.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,15 +474,15 @@ func (i *Incident) GetRecipientsChannel(evTime time.Time) ContactChannels {
continue
}

contactChs.LoadEscalationRecipientsChannel(escalation.EscalationTemplate, i, evTime)
contactChs.LoadEscalationRecipientsChannel(escalation.Recipients, i, evTime)
}

return contactChs
}

// LoadEscalationRecipientsChannel loads all the configured channel of all the provided escalation recipients.
func (rct ContactChannels) LoadEscalationRecipientsChannel(escalation *rule.EscalationTemplate, i *Incident, t time.Time) {
for _, escalationRecipient := range escalation.Recipients {
func (rct ContactChannels) LoadEscalationRecipientsChannel(escRecipients []*rule.EscalationRecipient, i *Incident, t time.Time) {
for _, escalationRecipient := range escRecipients {
role := i.Recipients[escalationRecipient.Key]
if role == common.RoleNone {
continue
Expand Down

0 comments on commit 82bff48

Please sign in to comment.