From 4297af1349b4b1b167994c860460559ca084deea Mon Sep 17 00:00:00 2001 From: kohlerpop1 Date: Sun, 12 May 2024 20:47:13 -0400 Subject: [PATCH] Simplify LiveDataMapper#map --- .../github/jwdeveloper/tiktok/http/mappers/LiveDataMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/src/main/java/io/github/jwdeveloper/tiktok/http/mappers/LiveDataMapper.java b/Client/src/main/java/io/github/jwdeveloper/tiktok/http/mappers/LiveDataMapper.java index 02bae22..4006e9c 100644 --- a/Client/src/main/java/io/github/jwdeveloper/tiktok/http/mappers/LiveDataMapper.java +++ b/Client/src/main/java/io/github/jwdeveloper/tiktok/http/mappers/LiveDataMapper.java @@ -65,7 +65,7 @@ public class LiveDataMapper { default -> LiveData.LiveStatus.HostNotFound; }; response.setLiveStatus(statusValue); - } else if (data.has("prompts") && jsonObject.has("status_code") && data.get("prompts").getAsString().isEmpty() && jsonObject.get("status_code").isJsonPrimitive()) { + } else if (data.has("prompts") && data.get("prompts").getAsString().isEmpty() && jsonObject.has("status_code")) { response.setAgeRestricted(jsonObject.get("status_code").getAsInt() == TikTokLiveHttpClient.TIKTOK_AGE_RESTRICTED_CODE); } else { response.setLiveStatus(LiveData.LiveStatus.HostNotFound);