Skip to content

Commit

Permalink
Improve Slack message formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lnsp committed Sep 27, 2022
1 parent 8255656 commit 5948e47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/chat/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...))
Expand Down

0 comments on commit 5948e47

Please sign in to comment.