diff options
author | George Hazan <ghazan@miranda.im> | 2022-09-29 22:36:58 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-09-29 22:37:06 +0300 |
commit | c67e7825ccd72b889b6b8448d17e206c88bb21ca (patch) | |
tree | 596150a7b7964a67d9bfb9892586cccfc234c60f /protocols/WhatsAppWeb/src/proto.cpp | |
parent | 41177f3c026f3eacfc02bc9c94373750dab35326 (diff) |
WhatsApp: persistent iq handlers + qr code dialog
Diffstat (limited to 'protocols/WhatsAppWeb/src/proto.cpp')
-rw-r--r-- | protocols/WhatsAppWeb/src/proto.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/WhatsAppWeb/src/proto.cpp b/protocols/WhatsAppWeb/src/proto.cpp index 65b449807b..c3d965e919 100644 --- a/protocols/WhatsAppWeb/src/proto.cpp +++ b/protocols/WhatsAppWeb/src/proto.cpp @@ -33,6 +33,7 @@ WhatsAppProto::WhatsAppProto(const char *proto_name, const wchar_t *username) : m_tszDefaultGroup(getWStringA(DBKEY_DEF_GROUP)), m_arUsers(10, CompareUsers), m_arOwnMsgs(1, CompareOwnMsgs), + m_arPersistent(1), m_arPacketQueue(10), m_wszDefaultGroup(this, "DefaultGroup", L"WhatsApp"), m_bHideGroupchats(this, "HideChats", true) @@ -48,6 +49,9 @@ WhatsAppProto::WhatsAppProto(const char *proto_name, const wchar_t *username) : HookProtoEvent(ME_OPT_INITIALISE, &WhatsAppProto::OnOptionsInit); + m_arPersistent.insert(new WAPersistentHandler("iq", "md", "pair-device", &WhatsAppProto::OnIqPairDevice)); + m_arPersistent.insert(new WAPersistentHandler("iq", "md", "pair-success", &WhatsAppProto::OnIqPairSuccess)); + // Client id generation m_szClientId = getMStringA(DBKEY_CLIENT_ID); if (m_szClientId.IsEmpty()) { |