use slack attachment title instead of pretext

This commit is contained in:
c9s 2021-05-16 18:07:06 +08:00
parent e7c718ee15
commit 45e930a086

View File

@ -102,11 +102,12 @@ func (trade Trade) SlackAttachment() slack.Attachment {
}
liquidity := trade.Liquidity()
pretext := util.Render(slackTradeTextTemplate, trade)
title := util.Render(slackTradeTextTemplate, trade)
return slack.Attachment{
Title: title,
// Text: text,
Pretext: pretext,
Color: color,
// Pretext: pretext,
Color: color,
Fields: []slack.AttachmentField{
{Title: "Exchange", Value: trade.Exchange.String(), Short: true},
{Title: "Price", Value: util.FormatFloat(trade.Price, 2), Short: true},