Enable Long Polling for Telegram. Reduces bandwidth consumption. (#350)

Fixes #349.
pull/352/head
ValdikSS 7 years ago committed by Wim
parent 762c3350f4
commit 2e2187ebf4

@ -35,7 +35,9 @@ func (b *Btelegram) Connect() error {
flog.Debugf("%#v", err)
return err
}
updates, err := b.c.GetUpdatesChan(tgbotapi.NewUpdate(0))
u := tgbotapi.NewUpdate(0)
u.Timeout = 60
updates, err := b.c.GetUpdatesChan(u)
if err != nil {
flog.Debugf("%#v", err)
return err

Loading…
Cancel
Save