Report WhatsApp server connection errors to user too. Fixes #18
This commit is contained in:
@ -118,7 +118,10 @@ const cmdLoginHelp = `login - Authenticate this Bridge as WhatsApp Web Client`
|
||||
// CommandLogin handles login command
|
||||
func (handler *CommandHandler) CommandLogin(ce *CommandEvent) {
|
||||
if ce.User.Conn == nil {
|
||||
ce.User.Connect(true)
|
||||
if !ce.User.Connect(true) {
|
||||
ce.User.log.Debugln("Connect() returned false, assuming error was logged elsewhere and canceling login.")
|
||||
return
|
||||
}
|
||||
}
|
||||
ce.User.Login(ce)
|
||||
}
|
||||
|
Reference in New Issue
Block a user