diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-14 18:56:11 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-14 18:56:11 +0000 |
commit | 25f87650dab37f5a7380ae2121c7529cb3ac801a (patch) | |
tree | 377f4ba9fd4d3528aeb05414157948c5abaf376f /protocols/WhatsApp/src/WhatsAPI++ | |
parent | a8c76fb1f7113f18fda981ae885066d04619571f (diff) |
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
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp | 2 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/WAConnection.h | 2 |
2 files changed, 2 insertions, 2 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);
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h index 5b6970df60..e85ebbe5db 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h +++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.h @@ -36,7 +36,7 @@ public: virtual void onMessageError(const FMessage &message, int paramInt) = 0;
virtual void onPing(const std::string ¶mString) throw (WAException) = 0;
virtual void onPingResponseReceived() = 0;
- virtual void onAvailable(const std::string ¶mString, bool paramBoolean, int lastSeenTime = -1) = 0;
+ virtual void onAvailable(const std::string ¶mString, bool paramBoolean, DWORD lastSeenTime = 0) = 0;
virtual void onClientConfigReceived(const std::string ¶mString) = 0;
virtual void onIsTyping(const std::string ¶mString, bool paramBoolean) = 0;
virtual void onAccountChange(int paramInt, time_t paramLong) = 0;
|