forked from lug/matterbridge
Update Rhymen/go-whatsapp vendor (#876)
This commit is contained in:
10
vendor/github.com/Rhymen/go-whatsapp/session.go
generated
vendored
10
vendor/github.com/Rhymen/go-whatsapp/session.go
generated
vendored
@@ -100,6 +100,14 @@ func (wac *Conn) SetClientName(long, short string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
SetClientVersion sets WhatsApp client version
|
||||
Default value is 0.3.3324
|
||||
*/
|
||||
func (wac *Conn) SetClientVersion(major int, minor int, patch int) {
|
||||
waVersion = []int{major, minor, patch}
|
||||
}
|
||||
|
||||
/*
|
||||
Login is the function that creates a new whatsapp session and logs you in. If you do not want to scan the qr code
|
||||
every time, you should save the returned session and use RestoreWithSession the next time. Login takes a writable channel
|
||||
@@ -187,6 +195,8 @@ func (wac *Conn) Login(qrChan chan<- string) (Session, error) {
|
||||
var resp2 []interface{}
|
||||
select {
|
||||
case r1 := <-s1:
|
||||
wac.loginSessionLock.Lock()
|
||||
defer wac.loginSessionLock.Unlock()
|
||||
if err := json.Unmarshal([]byte(r1), &resp2); err != nil {
|
||||
return session, fmt.Errorf("error decoding qr code resp: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user