|
@ -113,6 +113,7 @@ public class StoriesService extends BaseService { |
|
|
for (int i = 0; i < feedStoriesReel.length(); ++i) { |
|
|
for (int i = 0; i < feedStoriesReel.length(); ++i) { |
|
|
final JSONObject node = feedStoriesReel.getJSONObject(i); |
|
|
final JSONObject node = feedStoriesReel.getJSONObject(i); |
|
|
final JSONObject userJson = node.getJSONObject(node.has("user") ? "user" : "owner"); |
|
|
final JSONObject userJson = node.getJSONObject(node.has("user") ? "user" : "owner"); |
|
|
|
|
|
try { |
|
|
final User user = new User(userJson.getLong("pk"), |
|
|
final User user = new User(userJson.getLong("pk"), |
|
|
userJson.getString("username"), |
|
|
userJson.getString("username"), |
|
|
userJson.optString("full_name"), |
|
|
userJson.optString("full_name"), |
|
@ -160,6 +161,8 @@ public class StoriesService extends BaseService { |
|
|
} |
|
|
} |
|
|
feedStoryModels.add(new FeedStoryModel(id, user, fullyRead, timestamp, firstStoryModel, mediaCount, false, isBestie)); |
|
|
feedStoryModels.add(new FeedStoryModel(id, user, fullyRead, timestamp, firstStoryModel, mediaCount, false, isBestie)); |
|
|
} |
|
|
} |
|
|
|
|
|
catch (Exception e) {} // to cover promotional reels with non-long user pk's |
|
|
|
|
|
} |
|
|
final JSONArray broadcasts = new JSONObject(body).getJSONArray("broadcasts"); |
|
|
final JSONArray broadcasts = new JSONObject(body).getJSONArray("broadcasts"); |
|
|
for (int i = 0; i < broadcasts.length(); ++i) { |
|
|
for (int i = 0; i < broadcasts.length(); ++i) { |
|
|
final JSONObject node = broadcasts.getJSONObject(i); |
|
|
final JSONObject node = broadcasts.getJSONObject(i); |
|
|