From 7ec4cc63fa1b31af0496ac934d001323519c838f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Nov 2014 14:50:27 +0000 Subject: minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@10944 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 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 f819ff8737..d8e57c5882 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp @@ -493,7 +493,7 @@ bool WAConnection::read() throw(WAException) this->event_handler->onPing(*id); } else if (ProtocolTreeNode::tagEquals(childNode, "query") && (from != NULL) ? false : // (childNode->getAttributeValue("xmlns") != NULL) && ((*childNode->getAttributeValue("xmlns")).compare("http://jabber.org/protocol/disco#info") == 0) : - (ProtocolTreeNode::tagEquals(childNode, "relay")) && (from != NULL)) { + (ProtocolTreeNode::tagEquals(childNode, "relay")) && (from != NULL)) { std::string* pin = childNode->getAttributeValue("pin"); std::string* timeoutString = childNode->getAttributeValue("timeout"); int timeoutSeconds; @@ -696,7 +696,7 @@ void WAConnection::sendMessageReceived(FMessage* message) throw(WAException) } void WAConnection::sendDeliveredReceiptAck(const std::string& to, - const std::string& id) throw(WAException) + const std::string& id) throw(WAException) { ProtocolTreeNode *root = getReceiptAck(to, id, "delivered"); this->out->write(root); @@ -1036,9 +1036,8 @@ void WAConnection::parseMessageInitialTagAlreadyChecked(ProtocolTreeNode* messag if (ProtocolTreeNode::tagEquals(child2, "set")) { std::string* id = child2->getAttributeValue("id"); std::string* author = child2->getAttributeValue("author"); - if (id != NULL) { + if (id != NULL) this->event_handler->onPictureChanged(*from, ((author == NULL) ? "" : *author), true); - } } else if (ProtocolTreeNode::tagEquals(child2, "delete")) { std::string* author = child2->getAttributeValue("author"); @@ -1047,13 +1046,11 @@ void WAConnection::parseMessageInitialTagAlreadyChecked(ProtocolTreeNode* messag } } } - else if (ProtocolTreeNode::tagEquals(child, "request")) { + else if (ProtocolTreeNode::tagEquals(child, "request")) flag = true; - } } - if (flag) { + if (flag) this->sendNotificationReceived(*from, *id); - } } } } -- cgit v1.2.3