mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-14 17:33:48 +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
|
var qrEventID id.EventID
|
||||||
for item := range qrChan {
|
for item := range qrChan {
|
||||||
switch item.Code {
|
switch item.Event {
|
||||||
case whatsmeow.QRChannelSuccess.Code:
|
case whatsmeow.QRChannelSuccess.Code:
|
||||||
jid := ce.User.Client.Store.ID
|
jid := ce.User.Client.Store.ID
|
||||||
ce.Reply("Successfully logged in as +%s (device #%d)", jid.User, jid.Device)
|
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 {
|
for {
|
||||||
select {
|
select {
|
||||||
case evt := <-qrChan:
|
case evt := <-qrChan:
|
||||||
switch evt.Code {
|
switch evt.Event {
|
||||||
case whatsmeow.QRChannelSuccess.Code:
|
case whatsmeow.QRChannelSuccess.Code:
|
||||||
jid := user.Client.Store.ID
|
jid := user.Client.Store.ID
|
||||||
user.log.Debugln("Successful login as", jid, "via provisioning API")
|
user.log.Debugln("Successful login as", jid, "via provisioning API")
|
||||||
|
|
Loading…
Reference in a new issue