notifier/telegramnotifier: check chats map

This commit is contained in:
c9s 2022-01-16 01:00:15 +08:00
parent 5f4239d108
commit d1cfaec7d3

View File

@ -120,6 +120,9 @@ func (n *Notifier) NotifyTo(channel string, obj interface{}, args ...interface{}
}
func (n *Notifier) AddChat(c *telebot.Chat) {
if n.Chats == nil {
n.Chats = make(map[int64]*telebot.Chat)
}
n.Chats[c.ID] = c
}