deposit2transfer: add pin support

This commit is contained in:
c9s 2024-11-12 16:09:51 +08:00
parent 41b1991843
commit ee7beeced6
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -44,6 +44,7 @@ func init() {
type SlackAlert struct { type SlackAlert struct {
Channel string `json:"channel"` Channel string `json:"channel"`
Mentions []string `json:"mentions"` Mentions []string `json:"mentions"`
Pin bool `json:"pin"`
} }
type Strategy struct { type Strategy struct {
@ -243,6 +244,7 @@ func (s *Strategy) addWatchingDeposit(deposit types.Deposit) {
if s.SlackAlert != nil { if s.SlackAlert != nil {
bbgo.PostLiveNote(&deposit, bbgo.PostLiveNote(&deposit,
livenote.Channel(s.SlackAlert.Channel), livenote.Channel(s.SlackAlert.Channel),
livenote.Pin(s.SlackAlert.Pin),
livenote.CompareObject(true), livenote.CompareObject(true),
livenote.OneTimeMention(s.SlackAlert.Mentions...), livenote.OneTimeMention(s.SlackAlert.Mentions...),
) )