diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-26 23:21:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-26 23:21:25 +0000 |
commit | 88d6662a12f18844e5487c3d35155d3fbbff85a5 (patch) | |
tree | 2090b9d565feb3c0004c3373313cf1ebb7c33c3a /protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | |
parent | e64e17858c88e0b8302a34cebc02be0019422947 (diff) |
fix for going offline in WhatsApp
git-svn-id: http://svn.miranda-ng.org/main/trunk@11921 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp index 7ae18a30d5..1abcd431dd 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp @@ -278,7 +278,7 @@ void WAConnection::parseAck(ProtocolTreeNode *node) throw(WAException) const string &id = node->getAttributeValue("id");
const string &ts = node->getAttributeValue("t");
- if (this->event_handler != NULL) {
+ if (cls == "message" && this->event_handler != NULL) {
FMessage msg(new Key(from, true, id));
msg.status = FMessage::STATUS_RECEIVED_BY_SERVER;
this->event_handler->onMessageStatusUpdate(&msg);
@@ -346,9 +346,10 @@ void WAConnection::parseMessage(ProtocolTreeNode *messageNode) throw (WAExceptio if (receiptRequested)
sendSubjectReceived(from, id);
}
- else if (typeAttribute == "chat") {
+ else if (typeAttribute == "chat" || typeAttribute == "text") {
FMessage* fmessage = new FMessage();
fmessage->wants_receipt = false;
+ fmessage->timestamp = atoi(attribute_t.c_str());
bool duplicate = false;
std::vector<ProtocolTreeNode*> messageChildren(messageNode->getAllChildren());
|