From 4cf441773e4d163fd272c717db36e133976f6382 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sun, 4 Oct 2020 10:24:32 -0400 Subject: [PATCH] fb messenger experience --- .../main/java/awais/instagrabber/utils/ResponseBodyUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/utils/ResponseBodyUtils.java b/app/src/main/java/awais/instagrabber/utils/ResponseBodyUtils.java index f5879d76..c21b77f9 100644 --- a/app/src/main/java/awais/instagrabber/utils/ResponseBodyUtils.java +++ b/app/src/main/java/awais/instagrabber/utils/ResponseBodyUtils.java @@ -265,11 +265,11 @@ public final class ResponseBodyUtils { final ProfileModel[] userModels = new ProfileModel[usersLen]; for (int j = 0; j < usersLen; ++j) { final JSONObject userObject = users.getJSONObject(j); - userModels[j] = new ProfileModel(userObject.getBoolean("is_private"), + userModels[j] = new ProfileModel(userObject.optBoolean("is_private"), false, userObject.optBoolean("is_verified"), String.valueOf(userObject.get("pk")), - userObject.getString("username"), + userObject.optString("username"), // optional cuz fb users userObject.getString("full_name"), null, null, userObject.getString("profile_pic_url"),