Update dependencies/vendor (#1659)

This commit is contained in:
Wim
2021-12-12 00:05:15 +01:00
committed by GitHub
parent 658bdd9faa
commit 3893a035be
214 changed files with 8892 additions and 5650 deletions

View File

@@ -71,6 +71,7 @@ type Client struct {
WsConnected bool
OnWsConnect func()
reconnectBusy bool
Timeout int
logger *logrus.Entry
rootLogger *logrus.Logger
@@ -80,6 +81,8 @@ type Client struct {
lastPong time.Time
}
var Matterircd bool
func New(login string, pass string, team string, server string, mfatoken string) *Client {
rootLogger := logrus.New()
rootLogger.SetFormatter(&prefixed.TextFormatter{
@@ -229,7 +232,12 @@ func (m *Client) initClient(b *backoff.Backoff) error {
},
Proxy: http.ProxyFromEnvironment,
}
m.Client.HTTPClient.Timeout = time.Second * 10
if m.Timeout == 0 {
m.Timeout = 10
}
m.Client.HTTPClient.Timeout = time.Second * time.Duration(m.Timeout)
// handle MMAUTHTOKEN and personal token
if err := m.handleLoginToken(); err != nil {
@@ -613,7 +621,9 @@ func (m *Client) WsReceiver(ctx context.Context) {
Team: m.Credentials.Team,
}
m.parseMessage(msg)
if !Matterircd {
m.parseMessage(msg)
}
m.MessageChan <- msg
case response := <-m.WsClient.ResponseChannel: