4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-13 18:26:28 +00:00

Update telegram-bot-api to v5 (#1660)

This commit is contained in:
Wim
2021-12-12 00:35:32 +01:00
committed by GitHub
parent 3893a035be
commit 02e3d7852b
23 changed files with 6934 additions and 3757 deletions

View File

@ -9,7 +9,7 @@ import (
"github.com/42wim/matterbridge/bridge"
"github.com/42wim/matterbridge/bridge/config"
"github.com/42wim/matterbridge/bridge/helper"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
)
const (
@ -49,11 +49,7 @@ func (b *Btelegram) Connect() error {
}
u := tgbotapi.NewUpdate(0)
u.Timeout = 60
updates, err := b.c.GetUpdatesChan(u)
if err != nil {
b.Log.Debugf("%#v", err)
return err
}
updates := b.c.GetUpdatesChan(u)
b.Log.Info("Connection succeeded")
go b.handleRecv(updates)
return nil