mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Ensuring notifications displayed correctly in mobile device with Google Chat (#27578)
* Added previewText to Google Chat notifier
This commit is contained in:
parent
7e96b1f38b
commit
20292bdb0e
@ -58,6 +58,7 @@ Structs used to build a custom Google Hangouts Chat message card.
|
|||||||
See: https://developers.google.com/hangouts/chat/reference/message-formats/cards
|
See: https://developers.google.com/hangouts/chat/reference/message-formats/cards
|
||||||
*/
|
*/
|
||||||
type outerStruct struct {
|
type outerStruct struct {
|
||||||
|
PreviewText string `json:"previewText"`
|
||||||
FallbackText string `json:"fallbackText"`
|
FallbackText string `json:"fallbackText"`
|
||||||
Cards []card `json:"cards"`
|
Cards []card `json:"cards"`
|
||||||
}
|
}
|
||||||
@ -195,6 +196,7 @@ func (gcn *GoogleChatNotifier) Notify(evalContext *alerting.EvalContext) error {
|
|||||||
|
|
||||||
// nest the required structs
|
// nest the required structs
|
||||||
res1D := &outerStruct{
|
res1D := &outerStruct{
|
||||||
|
PreviewText: evalContext.GetNotificationTitle(),
|
||||||
FallbackText: evalContext.GetNotificationTitle(),
|
FallbackText: evalContext.GetNotificationTitle(),
|
||||||
Cards: []card{
|
Cards: []card{
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user