2
0
mirror of https://github.com/42wim/matterbridge synced 2024-11-19 03:25:33 +00:00

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

Fixes #349.
This commit is contained in:
ValdikSS 2018-01-29 14:07:26 +03:00 committed by Wim
parent 762c3350f4
commit 2e2187ebf4

View File

@ -35,7 +35,9 @@ func (b *Btelegram) Connect() error {
flog.Debugf("%#v", err) flog.Debugf("%#v", err)
return 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 { if err != nil {
flog.Debugf("%#v", err) flog.Debugf("%#v", err)
return err return err