diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 10 | ||||
-rw-r--r-- | protocols/WhatsApp/src/contacts.cpp | 2 | ||||
-rw-r--r-- | protocols/WhatsApp/src/version.h | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp index 6052c768bc..a14b576f14 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp @@ -586,13 +586,11 @@ void WAConnection::parsePresense(ProtocolTreeNode *node) throw(WAException) return;
}
- const string &type = node->getAttributeValue("type");
- if (type == "unavailable") {
- if (m_pEventHandler != NULL)
+ if (m_pEventHandler != NULL) {
+ const string &type = node->getAttributeValue("type");
+ if (type == "unavailable")
m_pEventHandler->onAvailable(from, false);
- }
- else if (type == "available" || type == "") {
- if (m_pEventHandler != NULL)
+ else if (type == "available" || type == "")
m_pEventHandler->onAvailable(from, true);
}
}
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index abdfeea923..f021b575c6 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -116,7 +116,7 @@ void WhatsAppProto::onAvailable(const std::string ¶mString, bool paramBoolea }
}
- setDword(hContact, WHATSAPP_KEY_LAST_SEEN, 0);
+ setDword(hContact, WHATSAPP_KEY_LAST_SEEN, time(NULL));
UpdateStatusMsg(hContact);
}
diff --git a/protocols/WhatsApp/src/version.h b/protocols/WhatsApp/src/version.h index eec0da9fe0..8abf89f928 100644 --- a/protocols/WhatsApp/src/version.h +++ b/protocols/WhatsApp/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 2
-#define __BUILD_NUM 11
+#define __BUILD_NUM 12
#include <stdver.h>
|