summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/json.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-03-19 00:12:54 +0000
committerRobert Pösel <robyer@seznam.cz>2014-03-19 00:12:54 +0000
commit887abb55d8fe93f158ce21eb1ecce4375ddabccb (patch)
tree6083645b7711fcb7d43088ceead3ce0cd4d1b54f /protocols/FacebookRM/src/json.cpp
parent4c6d7054a9d545c8d8978b6fe1d1f8a89119f2c7 (diff)
Facebook: Implemented function to manually refresh contact info; version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@8656 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r--protocols/FacebookRM/src/json.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index ee2c9abbab..34b23a1fc9 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -165,6 +165,12 @@ void parseUser(JSONNODE *it, facebook_user *fbu)
{
fbu->user_id = json_name(it);
+ JSONNODE *id = json_get(it, "id");
+ if (id == NULL || json_as_pstring(id) == "0" || json_as_pstring(id).empty()) {
+ // this user has deleted account or is just unavailable for us (e.g., ignore list) -> don't read dummy name and avatar and rather ignore that completely
+ return;
+ }
+
JSONNODE *name = json_get(it, "name");
JSONNODE *thumbSrc = json_get(it, "thumbSrc");
JSONNODE *gender = json_get(it, "gender");
@@ -187,6 +193,7 @@ void parseUser(JSONNODE *it, facebook_user *fbu)
case 2: // male
fbu->gender = 77;
break;
+ // case 7: not available female?
}
}