summaryrefslogtreecommitdiff
path: root/protocols/WhatsAppWeb/src/qrcode.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-09-29 22:36:58 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-09-29 22:37:06 +0300
commitc67e7825ccd72b889b6b8448d17e206c88bb21ca (patch)
tree596150a7b7964a67d9bfb9892586cccfc234c60f /protocols/WhatsAppWeb/src/qrcode.cpp
parent41177f3c026f3eacfc02bc9c94373750dab35326 (diff)
WhatsApp: persistent iq handlers + qr code dialog
Diffstat (limited to 'protocols/WhatsAppWeb/src/qrcode.cpp')
-rw-r--r--protocols/WhatsAppWeb/src/qrcode.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/WhatsAppWeb/src/qrcode.cpp b/protocols/WhatsAppWeb/src/qrcode.cpp
index 7d8f1e187f..46b71700c5 100644
--- a/protocols/WhatsAppWeb/src/qrcode.cpp
+++ b/protocols/WhatsAppWeb/src/qrcode.cpp
@@ -113,8 +113,13 @@ bool WhatsAppProto::ShowQrCode(const CMStringA &ref)
{
CallFunctionSync(sttShowDialog, this);
- auto &pubKey = m_noise->noiseKeys.pub;
- CMStringA szQrData(FORMAT, "%s,%s,%s", ref.c_str(), ptrA(mir_base64_encode(pubKey.data(), pubKey.length())).get(), m_szClientId.c_str());
+ MBinBuffer secret;
+ getBlob(DBKEY_SECRET_KEY, secret);
+
+ ptrA s1(mir_base64_encode(m_noise->noiseKeys.pub));
+ ptrA s2(mir_base64_encode(m_noise->signedIdentity.pub));
+ ptrA s3(mir_base64_encode(secret));
+ CMStringA szQrData(FORMAT, "%s,%s,%s,%s", ref.c_str(), s1.get(), s2.get(), s3.get());
m_pQRDlg->SetData(szQrData);
return true;
}