diff --git a/internal/eventhandler/eventhandler.go b/internal/eventhandler/eventhandler.go index 38b736d47..fc3806908 100644 --- a/internal/eventhandler/eventhandler.go +++ b/internal/eventhandler/eventhandler.go @@ -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{}) diff --git a/internal/incident/incident.go b/internal/incident/incident.go index ac0ad0fc5..2f86af848 100644 --- a/internal/incident/incident.go +++ b/internal/incident/incident.go @@ -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