Skip to content

feat(SDK-751): add placement IDs to syncMessages - #914

Draft
jferrao-itrbl wants to merge 2 commits into
feature/SDK-548-feature-parityfrom
feature/SDK-751-sync-messages-placement-ids
Draft

jferrao-itrbl wants to merge 2 commits into
feature/SDK-548-feature-parityfrom
feature/SDK-751-sync-messages-placement-ids

Conversation

@jferrao-itrbl

@jferrao-itrbl jferrao-itrbl commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

📝 Summary

Add optional placement IDs to Iterable.embeddedManager.syncMessages() so embedded sync can target specific placements on iOS and Android.

🎟️ Jira Ticket: SDK-751

📖 Description

getMessages already accepts placement IDs, but syncMessages() always invoked the no-arg native sync and refreshed every placement. This PR threads an optional placementIds argument through the TurboModule spec, JS façade, and iOS/Android bridges, matching the serialization used by getEmbeddedMessages. When the argument is omitted, null, or an empty array, behavior is unchanged (sync all placements).

🧪 How to test?

  1. yarn lint && yarn typecheck && yarn test --coverage
  2. In the example app Embedded screen, call Iterable.embeddedManager.syncMessages() and confirm embedded messages still refresh.
  3. Call Iterable.embeddedManager.syncMessages([<placementId>]) and verify (native logs / network) that only the requested placement sync runs.

🧾 Changelog

Added optional placement IDs to Iterable.embeddedManager.syncMessages() (SDK-751). When omitted, null, or empty, behavior matches the previous sync-all call. See CHANGELOG.md Unreleased.

📹 Loom recording if applicable

N/A

🐞 Github Issues solved

N/A

📚 Docs PR if applicable

N/A

Expose optional placement scoping on embedded sync so RN matches native
Android and iOS APIs; omit/null/empty still syncs all placements.
@jferrao-itrbl
jferrao-itrbl requested a review from a team as a code owner October 1, 2026 21:49
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Lines Statements Branches Functions
Coverage: 72%
72.43% (594/820) 62.23% (239/384) 67.8% (179/264)

@qltysh

qltysh Bot commented Oct 1, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (2)

RatingFile% DiffUncovered Line #s
New file Coverage rating: A
src/core/classes/IterableApi.ts100.0%
New file Coverage rating: A
src/embedded/classes/IterableEmbeddedManager.ts100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@qltysh

qltysh Bot commented Oct 1, 2026

Copy link
Copy Markdown

1 new issue

Tool Category Rule Count
qlty Structure Function with high complexity (count = 5): syncEmbeddedMessages 1

ids[i] = (long) placementIds.getInt(i);
}
IterableApi.getInstance().getEmbeddedManager().syncMessages(ids);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with high complexity (count = 5): syncEmbeddedMessages [qlty:function-complexity]

@jferrao-itrbl
jferrao-itrbl marked this pull request as draft October 1, 2026 22:01
@jferrao-itrbl jferrao-itrbl changed the title feat(embedded): add placement IDs to syncMessages (SDK-751) feat(SDK-751): add placement IDs to syncMessages Oct 1, 2026
Lock AC2 sync-all inputs at IterableApi and IterableEmbeddedManager.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant