diff options
author | Wim <wim@42.be> | 2022-03-12 23:02:04 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2022-03-20 14:57:48 +0100 |
commit | aefa70891cfd489fccb8a9567b5bdafb0f863ede (patch) | |
tree | 90fe7c91d7b33b2a1ed08ea3a94840860adc6fc1 /vendor/go.mau.fi/whatsmeow/qrchan.go | |
parent | 1b9877fda45be021ea6a5677c78648cecc19dcd5 (diff) | |
download | matterbridge-msglm-aefa70891cfd489fccb8a9567b5bdafb0f863ede.tar.gz matterbridge-msglm-aefa70891cfd489fccb8a9567b5bdafb0f863ede.tar.bz2 matterbridge-msglm-aefa70891cfd489fccb8a9567b5bdafb0f863ede.zip |
Update vendor (whatsapp)
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/qrchan.go')
-rw-r--r-- | vendor/go.mau.fi/whatsmeow/qrchan.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/qrchan.go b/vendor/go.mau.fi/whatsmeow/qrchan.go index c96b2188..0aea93c9 100644 --- a/vendor/go.mau.fi/whatsmeow/qrchan.go +++ b/vendor/go.mau.fi/whatsmeow/qrchan.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Tulir Asokan +// Copyright (c) 2022 Tulir Asokan // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -36,6 +36,8 @@ var ( // QRChannelErrUnexpectedEvent is emitted from GetQRChannel if an unexpected connection event is received, // as that likely means that the pairing has already happened before the channel was set up. QRChannelErrUnexpectedEvent = QRChannelItem{Event: "err-unexpected-state"} + // QRChannelClientOutdated is emitted from GetQRChannel if events.ClientOutdated is received. + QRChannelClientOutdated = QRChannelItem{Event: "err-client-outdated"} // QRChannelScannedWithoutMultidevice is emitted from GetQRChannel if events.QRScannedWithoutMultidevice is received. QRChannelScannedWithoutMultidevice = QRChannelItem{Event: "err-scanned-without-multidevice"} ) @@ -117,6 +119,8 @@ func (qrc *qrChannel) handleEvent(rawEvt interface{}) { qrc.log.Debugf("QR code scanned without multidevice enabled") qrc.output <- QRChannelScannedWithoutMultidevice return + case *events.ClientOutdated: + outputType = QRChannelClientOutdated case *events.PairSuccess: outputType = QRChannelSuccess case *events.PairError: @@ -126,7 +130,7 @@ func (qrc *qrChannel) handleEvent(rawEvt interface{}) { } case *events.Disconnected: outputType = QRChannelTimeout - case *events.Connected, *events.ConnectFailure, *events.LoggedOut: + case *events.Connected, *events.ConnectFailure, *events.LoggedOut, *events.TemporaryBan: outputType = QRChannelErrUnexpectedEvent default: return |