5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-09 16:50:30 +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)
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