fix(alerting): Alphabetically sort Matrix provider

This commit is contained in:
Kalissaac authored and TwiN committed 2022-07-20 19:00:12 -04:00
1 parent 9d4a639f31
commit 755c8bb43a
4 files changed
+40 -40

No files matched your search

+6 -6
View File
@@ -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
}