From ebbf4ad769d99f07c6d5184d9fe4323e7eaf0246 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Jan 2015 23:20:50 +0000 Subject: avatars are back git-svn-id: http://svn.miranda-ng.org/main/trunk@11943 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 26 +++++----------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp') diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp index 29aaec738b..27dd4aff3a 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp @@ -650,31 +650,15 @@ void WAConnection::sendGetOwningGroups() throw (WAException) this->mutex->unlock(); } -void WAConnection::sendGetPicture(const std::string& jid, const std::string& type, const std::string& oldId, const std::string& newId) throw (WAException) +void WAConnection::sendGetPicture(const std::string& jid, const std::string& type) throw (WAException) { - std::string id = makeId("get_picture_"); - this->pending_server_requests[id] = new IqResultGetPhotoHandler(this, jid, oldId, newId); + std::string id = makeId("iq_"); + this->pending_server_requests[id] = new IqResultGetPhotoHandler(this, jid); - ProtocolTreeNode *listNode = new ProtocolTreeNode("picture") - << XATTR("xmlns", "w:profile:picture") << XATTR("type", type); + ProtocolTreeNode *listNode = new ProtocolTreeNode("picture") << XATTR("type", type); this->out->write(ProtocolTreeNode("iq", listNode) - << XATTR("id", id) << XATTR("to", jid) << XATTR("type", "get")); -} - -void WAConnection::sendGetPictureIds(const std::vector& jids) throw (WAException) -{ - std::string id = makeId("get_picture_ids_"); - this->pending_server_requests[id] = new IqResultGetPictureIdsHandler(this); - - std::vector* children = new std::vector(); - for (size_t i = 0; i < jids.size(); i++) { - ProtocolTreeNode *child = new ProtocolTreeNode("user") << XATTR("jid", jids[i]); - children->push_back(child); - } - - ProtocolTreeNode *queryNode = new ProtocolTreeNode("list", NULL, children) << XATTR("xmlns", "w:profile:picture"); - this->out->write(ProtocolTreeNode("iq", queryNode) << XATTR("id", id) << XATTR("type", "get")); + << XATTR("id", id) << XATTR("to", jid) << XATTR("xmlns", "w:profile:picture") << XATTR("type", "get")); } void WAConnection::sendGetPrivacyList() throw (WAException) -- cgit v1.2.3