From a76b0175b2cb203f4a0cc68c99588f23ef945eb6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 31 Jan 2015 21:20:00 +0000 Subject: fix for querying jabber:iq:last git-svn-id: http://svn.miranda-ng.org/main/trunk@11969 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 6 +++--- protocols/WhatsApp/src/connection.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols') diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp index ffaeff52b9..f1e671a4de 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp @@ -819,12 +819,12 @@ void WAConnection::sendPresenceSubscriptionRequest(const std::string &to) throw( void WAConnection::sendQueryLastOnline(const std::string &jid) throw (WAException) { - std::string id = makeId("last_"); + std::string id = makeId("iq_"); this->pending_server_requests[id] = new IqResultQueryLastOnlineHandler(this); - ProtocolTreeNode *queryNode = new ProtocolTreeNode("query") << XATTR("xmlns", "jabber:iq:last"); + ProtocolTreeNode *queryNode = new ProtocolTreeNode("query"); out.write(ProtocolTreeNode("iq", queryNode) - << XATTR("id", id) << XATTR("type", "get") << XATTR("to", jid)); + << XATTR("id", id) << XATTR("type", "get") << XATTR("to", jid) << XATTR("xmlns", "jabber:iq:last")); } void WAConnection::sendSetPicture(const std::string &jid, std::vector* data, std::vector* preview) throw (WAException) diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp index ca3f77a762..1eb90cd8ed 100644 --- a/protocols/WhatsApp/src/connection.cpp +++ b/protocols/WhatsApp/src/connection.cpp @@ -86,7 +86,7 @@ void WhatsAppProto::stayConnectedLoop(void*) ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)m_iStatus, ID_STATUS_CONNECTING); this->ToggleStatusMenuItems(true); - // ProcessBuddyList(0); + ForkThread(&WhatsAppProto::ProcessBuddyList, NULL); // #TODO Move out of try block. Exception is expected on disconnect while (true) { -- cgit v1.2.3