mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix chat nil pointer issue
This commit is contained in:
parent
4bde40f2db
commit
8acc2cd87f
|
@ -73,6 +73,10 @@ func (it *Interaction) HandleSubscribe(m *telebot.Message) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if it.session.Chats == nil {
|
||||||
|
it.session.Chats = make(map[int64]bool)
|
||||||
|
}
|
||||||
|
|
||||||
it.session.Chats[m.Chat.ID] = true
|
it.session.Chats[m.Chat.ID] = true
|
||||||
|
|
||||||
if _, err := it.bot.Send(m.Chat, "I just added your subscription"); err != nil {
|
if _, err := it.bot.Send(m.Chat, "I just added your subscription"); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user