diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-11-19 19:18:00 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-11-19 19:18:00 +0000 |
commit | d9afe7697ba309f6d78b61adea474942c0b55424 (patch) | |
tree | 5f1c65957f29d0fee1d381859c21ad58b562304b /protocols/FacebookRM/src/json.cpp | |
parent | 3000e4130b54028e8b10040fda3d9fc6f7302959 (diff) |
Facebook: distinguish more types of clients and don't reset old client at login/logoff
git-svn-id: http://svn.miranda-ng.org/main/trunk@6940 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index a103a6f29c..84e7b46abf 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -81,7 +81,7 @@ int facebook_json_parser::parse_buddy_list(void* data, List::List< facebook_user }
current->status_id = ID_STATUS_OFFLINE;
- current->mobile = true;
+ current->client = CLIENT_MOBILE;
}
}
@@ -113,16 +113,18 @@ int facebook_json_parser::parse_buddy_list(void* data, List::List< facebook_user if (json_as_pstring(status) != "active")
current->status_id = ID_STATUS_OFFLINE;
+ bool b;
+
// "webStatus" and "otherStatus" are marked as "WEB" on FB website
- if (json_as_pstring(webStatus) == "active" || json_as_pstring(otherStatus) == "active") {
- current->status_id = ID_STATUS_ONLINE;
- current->mobile = false;
+ if ((b = json_as_pstring(webStatus) == "active") || json_as_pstring(otherStatus) == "active") {
+ current->status_id = ID_STATUS_ONLINE;
+ current->client = b ? CLIENT_WEB : CLIENT_OTHER;
}
// "fbAppStatus" and "messengerStatus" are marked as "MOBILE" on FB website
- if (json_as_pstring(fbAppStatus) == "active" || json_as_pstring(messengerStatus) == "active") {
+ if ((b = json_as_pstring(fbAppStatus) == "active") || json_as_pstring(messengerStatus) == "active") {
current->status_id = ID_STATUS_ONTHEPHONE;
- current->mobile = true;
+ current->client = b ? CLIENT_APP : CLIENT_MESSENGER;
}
// this is not marked anyhow on website (yet?)
|