From 25f87650dab37f5a7380ae2121c7529cb3ac801a Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Mon, 14 Sep 2015 18:56:11 +0000 Subject: WhatsApp: Fixed reading/storing tiome in database patch by Cassio: It should also now display the following in the contact list: "Last online TIMESTAMP"; When a user is online currently "Denied: last online TIMESTAMP"; When the user is offline and has blocked "last seen". The time the user was last online simultaneously is used "Last seen TIMESTAMP"; When a user is offline but "last seen" info is available. git-svn-id: http://svn.miranda-ng.org/main/trunk@15352 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp') 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); -- cgit v1.2.3