summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
index 56c86c6806..524bb80f2a 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
@@ -588,7 +588,7 @@ void WAConnection::parsePresense(ProtocolTreeNode *node) throw(WAException)
const string &type = node->getAttributeValue("type");
if (type == "unavailable") {
const string &lastSeen = node->getAttributeValue("last");
- m_pEventHandler->onAvailable(from, false, (lastSeen == "deny") ? -2 : atoi(lastSeen.c_str()));
+ m_pEventHandler->onAvailable(from, false, (lastSeen == "deny") ? 0 : stoul(lastSeen));
}
else if (type == "available" || type == "")
m_pEventHandler->onAvailable(from, true);