summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/iq.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/iq.cpp b/protocols/WhatsApp/src/iq.cpp
index 50490829f7..3512266fe8 100644
--- a/protocols/WhatsApp/src/iq.cpp
+++ b/protocols/WhatsApp/src/iq.cpp
@@ -141,6 +141,11 @@ void WhatsAppProto::OnIqPairDevice(const WANode &node)
{
WSSendNode(WANodeIq(IQ::RESULT) << CHAR_PARAM("id", node.getAttr("id")));
+ if (m_bUnregister) {
+ m_bTerminated = true;
+ return;
+ }
+
if (auto *pRef = node.getChild("pair-device")->getChild("ref")) {
ShowQrCode(pRef->getBody());
}