diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-12-12 09:07:40 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-12-12 09:07:40 +0000 |
commit | 87c333c782b643cfc93b87f71db92d8c7e983aa2 (patch) | |
tree | 025f8e5c110286b6859b3fd3018c48aece792fec /protocols/FacebookRM/src/communication.cpp | |
parent | b0b34d3e9627301f77a6e225dc04465dae998d95 (diff) |
Facebook: Visibility/away improvements
* Mark contacts last active more than 1 minute ago as away
* Don't make us active for FB when we're invisible or away
git-svn-id: http://svn.miranda-ng.org/main/trunk@15843 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 2a2fe90333..047a71a0d9 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -450,7 +450,8 @@ std::string facebook_client::choose_action(RequestType request_type, std::string */ int idleSeconds = parent->IdleSeconds(); - action += "&idle=" + utils::conversion::to_string(&idleSeconds, UTILS_CONV_UNSIGNED_NUMBER); + if (idleSeconds > 0 && !parent->isInvisible()) + action += "&idle=" + utils::conversion::to_string(&idleSeconds, UTILS_CONV_UNSIGNED_NUMBER); action += "&cap=0"; // TODO: what's this item? Sometimes it's 0, sometimes 8 // action += "&wtc=0,0,0.000,0,0"; // TODO: what's this item? It's numbers grows with every new request... @@ -1207,6 +1208,10 @@ bool facebook_client::channel() bool facebook_client::activity_ping() { + // Don't send ping when we are not online + if (parent->m_iStatus != ID_STATUS_ONLINE) + return true; + handle_entry("activity_ping"); http::response resp = flap(REQUEST_ACTIVE_PING); |