fix(alerting): Alphabetically sort Matrix provider
This commit is contained in:
@ -87,6 +87,12 @@ func (config Config) GetAlertingProviderByAlertType(alertType alert.Type) provid
|
||||
return nil
|
||||
}
|
||||
return config.GoogleChat
|
||||
case alert.TypeMatrix:
|
||||
if config.Matrix == nil {
|
||||
// Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil
|
||||
return nil
|
||||
}
|
||||
return config.Matrix
|
||||
case alert.TypeMattermost:
|
||||
if config.Mattermost == nil {
|
||||
// Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil
|
||||
@ -135,12 +141,6 @@ func (config Config) GetAlertingProviderByAlertType(alertType alert.Type) provid
|
||||
return nil
|
||||
}
|
||||
return config.Twilio
|
||||
case alert.TypeMatrix:
|
||||
if config.Matrix == nil {
|
||||
// Since we're returning an interface, we need to explicitly return nil, even if the provider itself is nil
|
||||
return nil
|
||||
}
|
||||
return config.Matrix
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user