forked from lug/matterbridge
Update Rhymen/go-whatsapp vendor (#876)
This commit is contained in:
15
vendor/github.com/Rhymen/go-whatsapp/conn.go
generated
vendored
15
vendor/github.com/Rhymen/go-whatsapp/conn.go
generated
vendored
@@ -89,6 +89,8 @@ type Conn struct {
|
||||
|
||||
longClientName string
|
||||
shortClientName string
|
||||
|
||||
loginSessionLock sync.RWMutex
|
||||
}
|
||||
|
||||
type websocketWrapper struct {
|
||||
@@ -191,6 +193,19 @@ func (wac *Conn) Disconnect() (Session, error) {
|
||||
return *wac.session, err
|
||||
}
|
||||
|
||||
func (wac *Conn) AdminTest() (bool, error) {
|
||||
if !wac.connected {
|
||||
return false, ErrNotConnected
|
||||
}
|
||||
|
||||
if !wac.loggedIn {
|
||||
return false, ErrInvalidSession
|
||||
}
|
||||
|
||||
result, err := wac.sendAdminTest()
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (wac *Conn) keepAlive(minIntervalMs int, maxIntervalMs int) {
|
||||
defer wac.wg.Done()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user