summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-10 14:50:27 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-10 14:50:27 +0000
commit7ec4cc63fa1b31af0496ac934d001323519c838f (patch)
treeb8d828219b6740466891c30d99917c9e3ee472b2 /protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
parentc97c93c3d0eb5c2a0087cb953a069fb1db960991 (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@10944 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp13
1 files changed, 5 insertions, 8 deletions
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);
- }
}
}
}