Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Fix token not saved bug
Browse files Browse the repository at this point in the history
  • Loading branch information
karmanyaahm committed Mar 11, 2021
1 parent d92e2ae commit b39f629
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (user *User) Login(ce *CommandEvent) {
// // Also between the two logout methods (commands.go and provisioning.go)
// user.ConnectionErrors = 0
// user.JID = strings.Replace(user.Conn.Info.Wid, whatsappExt.OldUserSuffix, whatsappExt.NewUserSuffix, 1)
if len(ce.Args) == 0 {
if len(ce.Args) < 1 {
ce.Reply(`Get your access token from https://dev.groupme.com/ which should be the first argument to login`)
return
}
Expand All @@ -372,6 +372,7 @@ func (user *User) Login(ce *CommandEvent) {
//user.SetSession(&session)
ce.Reply("Successfully logged in, synchronizing chats...")
user.PostLogin()
user.Connect()
}

type Chat struct {
Expand Down Expand Up @@ -483,8 +484,8 @@ func (user *User) intPostLogin() {
log.Fatal(err) //TODO
}
user.JID = myuser.ID.String()
user.Update()
}
user.Update()

user.createCommunity()
user.tryAutomaticDoublePuppeting()
Expand Down

0 comments on commit b39f629

Please sign in to comment.