Repository navigation
feat(SDK-750): expose jsonOnly on in-app message payloads - #913
Merged
jferrao-itrbl merged 8 commits intoOct 12, 2026
Merged
jferrao-itrbl merged 8 commits into
jferrao-itrbl merged 8 commits into
Conversation
Serialize the native JSON-only flag onto bridge dictionaries so inAppHandler and message fetches can distinguish JSON-only in-apps from HTML messages.
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (1)
🛟 Help
|
Always overwrite jsonOnly with a boolean after toJSONObject() so the bridge does not forward native integer 1 to JS.
Use put(boolean) instead of putOpt so false is always written, and propagate JSONException to existing handlers in onNewInApp and getMessages paths.
jferrao-itrbl
marked this pull request as ready for review
October 8, 2026 07:49
rtlsilva
approved these changes
Oct 12, 2026
rtlsilva
left a comment
There was a problem hiding this comment.
Approved with one minor comment. Address or merge at will.
Add Robolectric tests for Android getInAppMessageJson boolean overwrite and Jest coverage for inAppHandler and getMessages jsonOnly payloads.
jferrao-itrbl
merged commit Oct 12, 2026
ac86101
into
feature/SDK-548-feature-parity
11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

📝 Summary
🎟️ Jira Ticket: SDK-750
📖 Description
Both pinned native SDKs already track JSON-only in-apps (
isJsonOnly()/jsonOnly), but the React Native bridge did not forward that flag on dictionaries delivered to JavaScript.This PR:
IterableInAppMessage.jsonOnlyon the JS model (fromDictdefaults missing values tofalse).jsonOnlyinIterableInAppMessage.toDict()(Serialization.swift).jsonOnlywith a boolean fromisJsonOnly()inRNIterableInternal.getInAppMessageJson()so handler and fetch paths match and native integer1is not forwarded to JS.Part of SDK-548 feature parity. Does not bridge iOS JSON-only acknowledgement APIs (
markJsonOnlyMessageHandled,getUnhandledJsonOnlyMessages); Android 3.10.1 has no matching API.No TurboModule / codegen changes.
🧪 How to test?
Automated (CI / local):
yarn lintyarn typecheckyarn test --coverageyarn check:circularManual (device or example app):
inAppHandlerconfigured.message.jsonOnly === true.message.jsonOnly === false.Iterable.inAppManager.getMessages()/getInboxMessages()and confirm the samejsonOnlyvalues for those messages.🧾 Changelog
CHANGELOG.mdUnreleased — AddedIterableInAppMessage.jsonOnlysoinAppHandlerand in-app message fetches can distinguish JSON-only messages from HTML in-apps (SDK-750).📹 Loom recording if applicable
N/A
🐞 Github Issues solved
None
📚 Docs PR if applicable
N/A (TypeDoc/JSDoc on
IterableInAppMessage.jsonOnlyonly; no iterable-docs change required for this additive field).