From 5948e47c07120bc9c5d73c940dd057bbc869a806 Mon Sep 17 00:00:00 2001 From: Lennart Espe <3391295+lnsp@users.noreply.github.com> Date: Tue, 27 Sep 2022 17:19:32 +0200 Subject: [PATCH] Improve Slack message formatting --- pkg/chat/chat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/chat/chat.go b/pkg/chat/chat.go index 0c6dd91..ec1805e 100644 --- a/pkg/chat/chat.go +++ b/pkg/chat/chat.go @@ -136,13 +136,13 @@ func (client *SlackClient) Send(note *CrashNotification) { slack.NewDividerBlock(), slack.NewSectionBlock(&slack.TextBlockObject{ Type: slack.MarkdownType, - Text: "Logs\n```\n" + note.Logs + "\n```", + Text: "*Logs*\n```\n" + note.Logs + "\n```", }, []*slack.TextBlockObject{}, nil), } if note.Reason != "" { blocks = append(blocks, slack.NewSectionBlock(&slack.TextBlockObject{ Type: slack.MarkdownType, - Text: "Reason\n```\n" + note.Reason + "\n```", + Text: "*Reason*\n```\n" + note.Reason + "\n```", }, []*slack.TextBlockObject{}, nil)) } _, _, _, err := client.Client.SendMessage(client.Channel, slack.MsgOptionBlocks(blocks...))