diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-29 16:24:44 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-29 16:24:44 +0000 |
commit | 518e9a70f554179f344510f594d7d759b56cea58 (patch) | |
tree | c1e952b455e38e5ab2ee92a8868afc34f51364ed /protocols/WhatsApp/src/WhatsAPI++ | |
parent | 25a7a059a20f51e6df201ba606e38c4aef45e8f0 (diff) |
fix for the automatic nick name extraction
git-svn-id: http://svn.miranda-ng.org/main/trunk@11951 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp index 9aa4450937..fcb659e97b 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp @@ -195,12 +195,8 @@ bool WAConnection::read() throw(WAException) if (node == NULL)
return false;
- #ifdef _DEBUG
- {
- string tmp = node->toString();
- rawConn->log(tmp.c_str());
- }
- #endif
+ string tmp = node->toString();
+ rawConn->log(tmp.c_str());
if (ProtocolTreeNode::tagEquals(node, "iq"))
parseIq(node);
@@ -307,6 +303,7 @@ void WAConnection::parseMessage(ProtocolTreeNode *messageNode) throw (WAExceptio const string &id = messageNode->getAttributeValue("id");
const string &attribute_t = messageNode->getAttributeValue("t");
const string &from = messageNode->getAttributeValue("from");
+ const string ¬ify = messageNode->getAttributeValue("notify");
const string &author = messageNode->getAttributeValue("author");
const string &typeAttribute = messageNode->getAttributeValue("type");
@@ -343,7 +340,7 @@ void WAConnection::parseMessage(ProtocolTreeNode *messageNode) throw (WAExceptio if (receiptRequested)
sendSubjectReceived(from, id);
}
- else if (typeAttribute == "chat" || typeAttribute == "text") {
+ else if (typeAttribute == "text") {
FMessage fmessage;
fmessage.wants_receipt = false;
fmessage.timestamp = atoi(attribute_t.c_str());
@@ -354,7 +351,7 @@ void WAConnection::parseMessage(ProtocolTreeNode *messageNode) throw (WAExceptio ProtocolTreeNode *childNode = messageChildren[i];
if (ProtocolTreeNode::tagEquals(childNode, "body")) {
fmessage.key = Key(from, false, id);
- fmessage.remote_resource = author;
+ fmessage.notifyname = notify;
fmessage.data = childNode->getDataAsString();
fmessage.status = FMessage::STATUS_UNSENT;
}
@@ -395,6 +392,7 @@ void WAConnection::parseMessage(ProtocolTreeNode *messageNode) throw (WAExceptio }
fmessage.key = Key(from, false, id);
+ fmessage.notifyname = notify;
fmessage.remote_resource = author;
}
}
|