mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-14 01:14:29 +01:00
Fix mistake in login code
This commit is contained in:
parent
9dc1b7911f
commit
9a3bb28801
2 changed files with 2 additions and 2 deletions
|
@ -509,7 +509,7 @@ func (handler *CommandHandler) CommandLogin(ce *CommandEvent) {
|
|||
|
||||
var qrEventID id.EventID
|
||||
for item := range qrChan {
|
||||
switch item.Code {
|
||||
switch item.Event {
|
||||
case whatsmeow.QRChannelSuccess.Code:
|
||||
jid := ce.User.Client.Store.ID
|
||||
ce.Reply("Successfully logged in as +%s (device #%d)", jid.User, jid.Device)
|
||||
|
|
|
@ -307,7 +307,7 @@ func (prov *ProvisioningAPI) Login(w http.ResponseWriter, r *http.Request) {
|
|||
for {
|
||||
select {
|
||||
case evt := <-qrChan:
|
||||
switch evt.Code {
|
||||
switch evt.Event {
|
||||
case whatsmeow.QRChannelSuccess.Code:
|
||||
jid := user.Client.Store.ID
|
||||
user.log.Debugln("Successful login as", jid, "via provisioning API")
|
||||
|
|
Loading…
Reference in a new issue