diff options
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 7 |
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?
}
}
|