Skip to content

Commit

Permalink
[MOB-10364] Update according to new discussiom
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeruchat committed Jan 10, 2025
1 parent 94169c1 commit 4f2301a
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,7 @@ static IterableInAppMessage fromJSONObject(@NonNull JSONObject messageJson, @Nul

String messageId = messageJson.optString(IterableConstants.KEY_MESSAGE_ID);
final Long campaignId = IterableUtil.retrieveValidCampaignIdOrNull(messageJson, IterableConstants.KEY_CAMPAIGN_ID);
boolean jsonOnly = false;

if (messageJson.has(IterableConstants.ITERABLE_IN_APP_JSON_ONLY)) {
Object jsonOnlyValue = messageJson.opt(IterableConstants.ITERABLE_IN_APP_JSON_ONLY);
if (jsonOnlyValue instanceof Boolean) {
jsonOnly = (Boolean) jsonOnlyValue;
} else if (jsonOnlyValue instanceof Integer) {
jsonOnly = ((Integer) jsonOnlyValue) == 1;
}
}
boolean jsonOnly = messageJson.optBoolean(IterableConstants.ITERABLE_IN_APP_JSON_ONLY, false);

JSONObject customPayload = messageJson.optJSONObject(IterableConstants.ITERABLE_IN_APP_CUSTOM_PAYLOAD);
if (customPayload == null && jsonOnly) {
Expand Down

0 comments on commit 4f2301a

Please sign in to comment.