diff options
author | Wim <wim@42.be> | 2020-08-24 23:35:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-24 23:35:08 +0200 |
commit | 2f506425c25504662f50f49e742529195d63ff27 (patch) | |
tree | 47170c6086cee16549a695329a478fd49174c299 /vendor/github.com/Rhymen/go-whatsapp/conn.go | |
parent | e8167ee3d73c47353eea1b0bd7062bd2fc3fc127 (diff) | |
download | matterbridge-msglm-2f506425c25504662f50f49e742529195d63ff27.tar.gz matterbridge-msglm-2f506425c25504662f50f49e742529195d63ff27.tar.bz2 matterbridge-msglm-2f506425c25504662f50f49e742529195d63ff27.zip |
Update whatsapp vendor and fix a panic (#1209)
* Fix another whatsapp panic
* Update whatsapp vendor
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/conn.go')
-rw-r--r-- | vendor/github.com/Rhymen/go-whatsapp/conn.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/conn.go b/vendor/github.com/Rhymen/go-whatsapp/conn.go index f8b57443..59445591 100644 --- a/vendor/github.com/Rhymen/go-whatsapp/conn.go +++ b/vendor/github.com/Rhymen/go-whatsapp/conn.go @@ -88,6 +88,8 @@ type Conn struct { Store *Store ServerLastSeen time.Time + timeTag string // last 3 digits obtained after a successful login takeover + longClientName string shortClientName string clientVersion string @@ -156,8 +158,8 @@ func (wac *Conn) connect() (err error) { }() dialer := &websocket.Dialer{ - ReadBufferSize: 25 * 1024 * 1024, - WriteBufferSize: 10 * 1024 * 1024, + ReadBufferSize: 0, + WriteBufferSize: 0, HandshakeTimeout: wac.msgTimeout, Proxy: wac.Proxy, } @@ -246,3 +248,11 @@ func (wac *Conn) keepAlive(minIntervalMs int, maxIntervalMs int) { } } } + +func (wac *Conn) GetConnected() bool { + return wac.connected +} + +func (wac *Conn) GetLoggedIn() bool { + return wac.loggedIn +} |