fix(alerting): Make Microsoft Teams title customizable (#731)
* Teams Custom Title * Update README.md * Small adjustment --------- Co-authored-by: TwiN <twin@linux.com>
This commit is contained in:
@ -21,6 +21,9 @@ type AlertProvider struct {
|
||||
|
||||
// Overrides is a list of Override that may be prioritized over the default configuration
|
||||
Overrides []Override `yaml:"overrides,omitempty"`
|
||||
|
||||
// Title is the title of the message that will be sent
|
||||
Title string `yaml:"title,omitempty"`
|
||||
}
|
||||
|
||||
// Override is a case under which the default integration is overridden
|
||||
@ -105,9 +108,12 @@ func (provider *AlertProvider) buildRequestBody(endpoint *core.Endpoint, alert *
|
||||
Type: "MessageCard",
|
||||
Context: "http://schema.org/extensions",
|
||||
ThemeColor: color,
|
||||
Title: "🚨 Gatus",
|
||||
Title: provider.Title,
|
||||
Text: message + description,
|
||||
}
|
||||
if len(body.Title) == 0 {
|
||||
body.Title = "🚨 Gatus"
|
||||
}
|
||||
if len(formattedConditionResults) > 0 {
|
||||
body.Sections = append(body.Sections, Section{
|
||||
ActivityTitle: "Condition results",
|
||||
|
Reference in New Issue
Block a user