File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import (
16
16
"gitlab.com/tslocum/cbind"
17
17
)
18
18
19
- var VERSION string = "v0.9.8 "
19
+ var VERSION string = "v0.9.9 "
20
20
21
21
var sndTxt string = ""
22
22
var currentReceiver messages.Chat = messages.Chat {}
Original file line number Diff line number Diff line change @@ -181,7 +181,12 @@ func (sm *SessionManager) setCurrentReceiver(id string) {
181
181
func (sm * SessionManager ) getConnection () * whatsapp.Conn {
182
182
var wac * whatsapp.Conn
183
183
if sm .connection == nil {
184
- wacc , err := whatsapp .NewConn (5 * time .Second )
184
+ options := & whatsapp.Options {
185
+ Timeout : 5 * time .Second ,
186
+ LongClientName : "WhatsCLI Client" ,
187
+ ShortClientName : "whatscli" ,
188
+ }
189
+ wacc , err := whatsapp .NewConnWithOptions (options )
185
190
if err != nil {
186
191
return nil
187
192
}
@@ -253,7 +258,9 @@ func (sm *SessionManager) disconnect() error {
253
258
254
259
// logout logs out the user, deletes session file
255
260
func (ub * SessionManager ) logout () error {
256
- ub .getConnection ().Disconnect ()
261
+ err := ub .getConnection ().Logout ()
262
+ ub .StatusChannel <- StatusMsg {false , err }
263
+ ub .uiHandler .PrintText ("removing login data.." )
257
264
return removeSession ()
258
265
}
259
266
You can’t perform that action at this time.
0 commit comments