summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp6
1 files changed, 3 insertions, 3 deletions
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<unsigned char>* data, std::vector<unsigned char>* preview) throw (WAException)